Any queries duplicate 1st row for all rows
Options
Using latest LINQPad4, registered version. All queries are returning the first row for all rows. Verified data in SSMS.
Comments
-
Forgot to mention, using EF dbContext connection...
-
If you use a standard LINQPad connection (automatic, LINQ-to-SQL) - does it work correctly?
-
LINQ-to-SQL does work correctly.
-
Looks to be a bug with my EF connection. Vistual Studio is giving me the same issue when I use the default return object (i.e. if I select a specific column value, it returns a valid list of results, but * returns the same result for all).
-
So I learned that EF has a "feature" that when you don't have a key defined (in this case it was in a view) that queries will exhibit this behavior.
Fixed it by defining a key in the EDMX design for the view.