In the Full .Net EF LIKE's used to be SqlMethods.Like
, eg:
from c in dc.Organization
where SqlMethods.Like(c.Boss, "%Jeremy%")
This doesn't work in EF Core and I get this error:
The name SqlMethods does not exist in the current context.
So how do you do a LIKE using Entity Framework CORE?
3条答案
按热度按时间cbeh67ev1#
The LIKE function has moved under
EF.Functions
in Core:dw1jzc5e2#
Instead of
Like
function you can useContains
mu0hgdu03#
Fluent version: