How do I create multiple parameters PostgresFunctionExpression

44 Views Asked by At

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

0

There are 0 best solutions below