I have a local list of values ββthat I need to verify the entity based on the database and return them.
If the list was already in the database, the following will work:
var list = ; var myList = context.Logs.Where(l => list.Any(li => l.LogNumber == li.LogNumber));
But if the list is local, it throws an error:
var list = new List<Log>(); var myList = context.Logs.Where(l => list.Any(li => l.LogNumber == li.LogNumber));
Exception: Unable to process the type 'Data.Log[]', because it has no known mapping to the value layer.
So, how can I map a local list to a database list using EF?
source share