I have a function i need to call from Postgres, This is what i have so far:
var s1 = new Npgsql.NpgsqlParameter("_date", NpgsqlDbType.Date)
{
Direction = System.Data.ParameterDirection.Input,
Value = DateTime.Now.Date
};
var command = await _context.AggregateBalances.FromSqlRaw($"SELECT * from get_aggregate_balance(@s1)", s1).ToListAsync();
When i try this i am getting this exception:
This is the output from pgAdmin:
To Map this result I created this model/dbset:
public class SPGetAggregateBalance
{
public int Id { get; set; }
public decimal Balance { get; set; }
}
public DbSet<SPGetAggregateBalance> AggregateBalances { get; set; }
Why "s1" is a column? and why it does not exist?

