Jer*_*son 6 c# sql-server entity-framework-core .net-core
在Full .net框架中有实体框架LIKE的Q + A:
如何在Linq中使用SQL Like%?
与实体框架中的运营商一样?
例如:
from c in dc.Organization
where SqlMethods.Like(c.Boss, "%Jeremy%")
Run Code Online (Sandbox Code Playgroud)
这在EF Core中不起作用:
名称SqlMethods在当前上下文中不存在.
那么你如何使用Entity Framework CORE做一个像?
Jer*_*son 11
LIKE函数已EF.Functions在Core中移动:
from c in dc.Organization
where EF.Functions.Like(c.Boss, "%Jeremy%")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2251 次 |
| 最近记录: |