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
Post a Comment