System.Linq.Dynamic.Core
System.Linq.Dynamic.Core copied to clipboard
try to call function inside select
im trying to call function inside select for get row number this work totally fine on normal linq select like :
db.JsonWebTokens
.Select(x=>new { Rank = Microsoft.EntityFrameworkCore.EF.Functions.RowNumber(EF.Functions.Over().OrderBy(x.Id)), x.Id }).ToArray();
but this not working on dynamic linq :
var res = db.JsonWebTokens
.Select("x=>new { Microsoft.EntityFrameworkCore.EF.Functions.RowNumber(EF.Functions.Over().OrderBy(x.Id)) as Rank, x.Id }")
.ToDynamicArray();
row number from extend library Zomp.EFCore.WindowFunctions.
exception : Enum type 'Microsoft.EntityFrameworkCore.EF.Functions' not found
Probably related to https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/772
PR merged, a new NuGet will be released in some time
tnx