1

This SO question describes how to call DatePart function using EntityFramework:

I wonder if I can provide a similar binding for PERCENTILE_CONT.

Or maybe the only way to use PERCENTILE_CONT via EntityFramework is to have a stored procedure and call it from my EF code?

LA.27
  • 1,888
  • 19
  • 35
  • 1
    You could probably build it off the `RowNumberExpression` source code, see https://github.com/dotnet/efcore/blob/main/src/EFCore.Relational/Query/SqlExpressions/RowNumberExpression.cs – Charlieface Dec 16 '21 at 11:02
  • Thanks. I tried creating something like this, but I've got hard time trying to call it. Do you have any resources on adding custom extensions into EntityFramework? I've tried googling myself, but most likely I use wrong phrase. – LA.27 Dec 16 '21 at 15:18
  • 1
    Don't be so optimistic, even you create RankExpression, you will need to replace SqlBuilder (whatever it is named in EF Core) – Svyatoslav Danyliv Dec 16 '21 at 19:34

0 Answers0