Wednesday, 15 September 2010

entity framework - ASP.net MVC Get entities where key is in an array/list -



entity framework - ASP.net MVC Get entities where key is in an array/list -

i have table(dbset) called 'submission' , list(of integer) containing selection of primary keys submission table.

how filter downwards dbset homecoming ienumerable(of submission) submissions primary key in list of integers?

if wanted 1 submission following:

dim db new myentities dim result submission result = db.submission.find(key) homecoming result

what need (obviously not using code below though wont work):

dim db new myentities dim keys list(of integer) dim results ienumerable(of submission) results = db.submission.find(keys) homecoming results

many in advance assistance!!

this c# syntax, but:

result = db.submission.where(s => keys.contains(s.id));

asp.net-mvc entity-framework list ienumerable

No comments:

Post a Comment