You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the setup below the query db.Set<FooBar>().Where(x => x.FooBarBaz.Contains("test")).Load() is translated to:
SELECT [x].[Id], [x].[FooBarBaz]
FROM [FooBar] AS [x]
WHERE CHARINDEX(N'test', [x].[FooBarBaz]) >0
The test didn't went through the converter. Similarly db.Set<FooBar>().Where(x => x.FooBarBaz.StartsWith("test")).Load() and db.Set<FooBar>().Where(x => x.FooBarBaz.EndsWith("test")).Load() respectively result in following SQL where the LEN is not not transformed:
SELECT [x].[Id], [x].[FooBarBaz]
FROM [FooBar] AS [x]
WHERE [x].[FooBarBaz] LIKE N'ToStoreExpr'+ N'ToStoreExpr'AND (LEFT([x].[FooBarBaz], LEN(N'test')) = N'ToStoreExpr')
SELECT [x].[Id], [x].[FooBarBaz]
FROM [FooBar] AS [x]
WHERE RIGHT([x].[FooBarBaz], LEN(N'test')) = N'ToStoreExpr'
With the setup below the query
db.Set<FooBar>().Where(x => x.FooBarBaz.Contains("test")).Load()
is translated to:The
test
didn't went through the converter. Similarlydb.Set<FooBar>().Where(x => x.FooBarBaz.StartsWith("test")).Load()
anddb.Set<FooBar>().Where(x => x.FooBarBaz.EndsWith("test")).Load()
respectively result in following SQL where theLEN
is not not transformed:Setup
Further technical details
EF Core version: 2.1.0-preview1-final
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
The text was updated successfully, but these errors were encountered: