Lambda generate wrong query - EF Core
Posted: Tue 16 Jun 2020 18:18
Hi, we are getting a error using "Devart.Data.PostgreSql.EFCore" and "Devart.Data.Oracle.EFCore"
we have a function that generate a lambda expression using commands, here a example of a lambda generated:
.Lambda #Lambda1<System.Func`2[Useall.Sign.Dominio.Documentos.Documento,System.Boolean]>(Useall.Sign.Dominio.Documentos.Documento $x)
{
$x.Id == 1 & $x.CodigoSistema == .Constant<System.Nullable`1[System.Int32]>(1)
}
Print: https://prnt.sc/t0xgyp
Devart generates this query:
SELECT COUNT(*)
FROM SIGN_DOC AS s
WHERE (s.IDUTILIZADOR = 0) AND ((s.IDDOC = 1) & ((s.IDSISTEMA = 1) AND s.IDSISTEMA IS NOT NULL))
and error appears: "operator does not exist: boolean & boolean"
Print: https://prnt.sc/t0xr7f
This error ocurrs in asp net core, we are using the same code in asp.net tradicional and works very good...
May you guys helpe us?
we have a function that generate a lambda expression using commands, here a example of a lambda generated:
.Lambda #Lambda1<System.Func`2[Useall.Sign.Dominio.Documentos.Documento,System.Boolean]>(Useall.Sign.Dominio.Documentos.Documento $x)
{
$x.Id == 1 & $x.CodigoSistema == .Constant<System.Nullable`1[System.Int32]>(1)
}
Print: https://prnt.sc/t0xgyp
Devart generates this query:
SELECT COUNT(*)
FROM SIGN_DOC AS s
WHERE (s.IDUTILIZADOR = 0) AND ((s.IDDOC = 1) & ((s.IDSISTEMA = 1) AND s.IDSISTEMA IS NOT NULL))
and error appears: "operator does not exist: boolean & boolean"
Print: https://prnt.sc/t0xr7f
This error ocurrs in asp net core, we are using the same code in asp.net tradicional and works very good...
May you guys helpe us?