Advanced Where Statements in Linq to Entity Framework

Posted by JimJams on Stack Overflow See other posts from Stack Overflow or by JimJams
Published on 2010-03-02T16:30:41Z Indexed on 2010/03/17 9:31 UTC
Read the original article Hit count: 311

Hi,

I am wanting to create a Where statement within my Linq statement, but have hit a bit of a stumbling block.

I would like to split a string value, and then search using each array item in the Where clause.

In my normal Sql statement I would simply loop through the string array, and build up there Where clause then either pass this to a stored procedure, or just execute the sql string. But am not sure how to do this with Linq to Entity?

( From o In db.TableName Where o.Field LIKE Stringvalue Select o ).ToList()

Hope you can help.

Thanks in advance!

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about vb.net