"like" queries in ASP.net MVC

Posted by sslepian on Stack Overflow See other posts from Stack Overflow or by sslepian
Published on 2010-03-30T01:25:22Z Indexed on 2010/03/30 1:33 UTC
Read the original article Hit count: 665

How do I get wildcard text searches (like SQL's "like" statement) in ASP.net MVC using the edo entity framework?

I assumed this would work:

var elig = (from e in _documentDataModel.Protocol_Eligibility_View
            where e.criteria.Contains(query)
            select e);

But it returns no results even when searching for a query string that's definitely in the database. What am I doing wrong?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about entity-framework