Showing posts with label linq entitiy exception insert. Show all posts
Showing posts with label linq entitiy exception insert. Show all posts

LINQ to Entities does not recognize the method 'get_Item(Int32)' method, and this method cannot be translated into a store expression.

LINQ to Entities does not recognize the method 'get_Item(Int32)' method, and this method cannot be translated into a store expression.


 objD = (From tblD In entity.Ds
                          Where tblD.DId = objDList(0).DRQId
                          Select tblD).FirstOrDefault()


I have faced the above error and find out some strange solution for that

Dim dId As String = objDList(0).DId



 objD = (From tblD In entity.Ds
                          Where tblD.DId = dId
                          Select tblD).FirstOrDefault()


Thanks to
http://www.xtremedotnettalk.com/showpost.php?p=469218&postcount=3

Keep ur coding aside.. Relax for some time..