Using FromSqlRaw with PostgreSQL and Entity Framework

-1

I have this table created on PostgreSQL:

enter image description here

When I try to execute:

var result = await DbSet.FromSqlRaw("SELECT * FROM public.\"AppProductVariants\"").ToListAsync();

I got this error: Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "public"

Any ideias?

Regards

c#
postgresql
asp.net-core
entity-framework-core
npgsql
asked on Stack Overflow Oct 29, 2020 by Michel Andrade • edited Oct 29, 2020 by Michel Andrade

1 Answer

1

You forgot from

abcdefghijklmnop

answered on Stack Overflow Oct 29, 2020 by Matthew

User contributions licensed under CC BY-SA 3.0