I am using LLBLGen 5.5 and the latest driver for NPGSql.
await adapter.ExecuteSQLAsync(@"
DO $$
BEGIN
SELECT * FROM institute_view WHERE institute_id=@instituteid AND day=@day AND month=@month AND year=@year;
END
$$
", new{
instituteid = notification.Id,
day = notification.DateUTC.Day,
month = notification.DateUTC.Month,
year = notification.DateUTC.Year
})
returns PostgresException: 42703: column "instituteid" does not exist.
If I remove the function declaration, it will work
await adapter.ExecuteSQLAsync(@"
SELECT * FROM institute_view WHERE institute_id=@instituteid AND day=@day AND month=@month AND year=@year;
", new{
instituteid = notification.Id,
day = notification.DateUTC.Day,
month = notification.DateUTC.Month,
year = notification.DateUTC.Year
})