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
DECLARE @__ef_filter__p_0 int=1;
SELECT [o].[Id], [o].[Nome], COALESCE([o].[Descrizione], N'') AS [Descrizione], CASE
WHEN [o].[Stato] = N'Attivo' THEN CAST(1ASbit)
ELSE CAST(0ASbit)
END AS [Attiva]
FROM [Opere] AS [o]
WHERE [o].[ClienteId] = @__ef_filter__p_0
This is the SQL generated from EF Core 9:
DECLARE @__ef_filter__p_0 int=1;
SELECT [o].[Id], [o].[Nome], COALESCE([o].[Descrizione], N'') AS [Descrizione],
~CAST([o].[Stato] ^ N'Attivo'ASbit) AS [Attiva]
FROM [Opere] AS [o]
WHERE [o].[ClienteId] = @__ef_filter__p_0
And this is the error:
Msg 402, Level 16, State 1, Line 4
The data types nvarchar(max) and nvarchar are incompatible in the '^' operator.
The text was updated successfully, but these errors were encountered:
SELECT [o].[Id], [o].[Nome], COALESCE([o].[Descrizione], N'') AS [Descrizione], CASE
WHEN [o].[Stato] = N'Attivo' THEN CAST(1ASbit)
ELSE CAST(0ASbit)
END AS [Attiva]
FROM [Opere] AS [o]
I have the following configuration for an entity:
The entity has these fields (some removed for simplicity):
This is the enumerator (Active/Inactive):
This is the service retrieving the data with a DTO:
This is the DTO:
This is the SQL generated from EF Core version 8:
This is the SQL generated from EF Core 9:
And this is the error:
The text was updated successfully, but these errors were encountered: