Entity Framework is not returning the proper data. It is repeating data from a single record
- 阅读更多 关于 Entity Framework is not returning the proper data. It is repeating data from a single record
问题 Using MVC 4 with EF code First. When doing linq to EF selects statements, the collections are being populated with what seems like the last record's data. And what's weirder, only some of the properties are repeated where others are not. It is best to show you by example: Using this query returns the proper data: var orders = db.Orders.ToList(); OrderID OrderTotal Name 1 215.00 Bob 2 415.00 Mark 3 315.50 Ralph When I filter the Orders entity by a SubscriberID, which is a foreign key, like so: