I have an existing pgSql database that I have to work with. It requires quoting of everything (table name, columns).
I’ve managed to do a manual select into my model using
db.Select< User >(@“Select * from ““User”””)
However, I cannot get it to work without manual select as it errors with Npgsql.PostgresException : 42P01: relation “user” does not exist.
This is the pgsql for the table
create table "User"
(
"Id" serial not null
constraint pk_user_5575058
primary key,
"FirstName" varchar(50),
"LastName" varchar(50),
"Email" varchar(50) not null,
"Password" varchar(255) not null,
"LocationId" integer
)
and here is my model
public class User
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public int LocationId { get; set; }
}