I am trying to delete all records in a PostgresSQL database table from ASP.NET Core 5.
However, I get this error:
syntax error at or near "FROM"
This is my code:
string Query = "DELETE FROM public.\"MyTable\"";
var d = await _context.MyTable.FromSqlRaw(Query).AnyAsync();
How to delete records with FromSQLRaw
?