Database Context View Objects Not Working as Expected With MVC 4

前端 未结 1 1404
感情败类
感情败类 2020-12-07 05:32

I am experiencing a very peculiar issue in my Code when using an Entity Framework View in MVC. I am only suspecting the problem to be attributed to the use of the View becau

相关标签:
1条回答
  • 2020-12-07 06:24

    A view also has a primary key in EF. If the key consists of field that are not really unique you can get duplicate rows in the result set. So you should investigate the view and decide what columns uniquely identify its rows and tell EF to use those columns as the primary key.

    0 讨论(0)
提交回复
热议问题