You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List<MyComplexObject>listInMemory=newList<MyComplexObject>{newMyComplexObject{Id1=1,Id2=2,Name="Name1"},newMyComplexObject{Id1=3,Id2=4,Name="Name2"}};// And a DbSet in your DbContextpublicDbSet<MyEntity>MyEntities{get;set;}varresult=MyEntities.Join(listInMemory,
entity =>new{entity.Id1,entity.Id2},
complexObject =>new{complexObject.Id1,complexObject.Id2},(entity,complexObject)=>entity);
I'm trying to verify a list of elements that exist in memory against something in my database, but I'm encountering this error.
resultSelector: (entity, complexObject) => entity)' could not be
translated
My problem would be simpler if I only have a list of in that case i could use something like this .Where(entity=>listOfIds.Contains(entity.Id)) unfortunately I have 2 "ids" that I need to check and I tried a list.Any but didn't work either
The text was updated successfully, but these errors were encountered:
Since 8.0, EF supports joining on a primitive list (that is, a list of ints, strings...) - as well as any other LINQ operator - but it does not yet support lists of complex types. #31237 is the issue tracking that.
I have the following code :
I'm trying to verify a list of elements that exist in memory against something in my database, but I'm encountering this error.
My problem would be simpler if I only have a list of in that case i could use something like this
.Where(entity=>listOfIds.Contains(entity.Id))
unfortunately I have 2 "ids" that I need to check and I tried a list.Any but didn't work eitherThe text was updated successfully, but these errors were encountered: