I have a query
select
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY "Order") as median
How do I use this function in EF EF.Functions or defined function mapping?
I try to define function method:
public double Median<T>(int percentile, T data, bool asc) => throw new NotImplementedException();
protected override void OnModelCreating(ModelBuilder builder)
{
builder.HasDbFunction(method)
.HasTranslation(......)
}
But I can't put more than one parameter in PostgresFunctionExpression