Entity framework result discrepancy for a database views

后端 未结 2 1562
抹茶落季
抹茶落季 2020-12-10 12:06

I have one specific view created in my DB(joins about 5-6 tables with a left join).This view is added to my edmx (entity framework 1.0) . Recently I noticed that one of the

2条回答
  •  自闭症患者
    2020-12-10 12:56

    The problem is in fact with the key. You have to a) have a unique identifier for each row in the view. and b) map that key accordingly in the edmx. Otherwise as your quote states, the mapping logic will see each subsequent row and figure that it can use the same object instance that it returned before

提交回复
热议问题