Strange LINQ Exception (Index out of bounds)

后端 未结 5 1129
天命终不由人
天命终不由人 2020-12-14 12:15

I have a table, we\'ll call Users. This table has a single primary key defined in SQL Server - an autoincrement int ID.

Sometimes, my LINQ

5条回答
  •  感动是毒
    2020-12-14 12:25

    I would say that you've got a model -> database mismatch somewhere. When I get as desperate as you on situations like this, I usually fire up VS.NET, create a new console app, and rebuild the section of the DBML which references the entity of interest in this query, and re-run. You may find that in this sort of isolation, the query works. Did you customize any of your entity definitions by filling out partial methods, especially the ones that fire on creation?

提交回复
热议问题