sql - IN query condition with Entity Framework -


does entity framework provide way use in where condition?

i'd use linq if possible generate query equivalent to:

select * dbo.strains name in ('a', 'b', 'c',  … ) 

var result = context.strains     .where(s => new[] { "a", "b", "c" }.contains(s.name)); 

entity framework smart enough translate appropriate sql.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -