Entity variable get list based on where
I am very开发者_StackOverflow new to EF. So I have an entity variable, how do I say give me all categories that start with 'a'?
You could try something like below, EF should translate StartsWith
to LIKE
MyEFContext.SomeTable.Where(someTable => someTable.categories.StartsWith("a"));
var aCategories = from cat in context.Categories
where cat.StartsWith("a")
select cat;
精彩评论