zzzprojects / System.Linq.Dynamic.Core

The .NET Standard / .NET Core version from the System Linq Dynamic functionality.
https://dynamic-linq.net/
Apache License 2.0
1.57k stars 228 forks source link

try to call function inside select #779

Closed mahdiyar021 closed 8 months ago

mahdiyar021 commented 8 months ago

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

StefH commented 8 months ago

Probably related to https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/772

StefH commented 8 months ago

PR merged, a new NuGet will be released in some time

mahdiyar021 commented 8 months ago

tnx