I have a Postgres 12 database that currently only consists of one simple table:
CREATE TABLE public.messages
(
sender text COLLATE pg_catalog."default",
"timestamp" timestamp with time zone,
message_id bigint,
text text COLLATE pg_catalog."default",
priority bigint,
parameters text[] COLLATE pg_catalog."default"
)
No I want to use Npgsql to build a GUI with C# and Entity Framework. I installed the Nuget package:
Install-Package EntityFramework6.Npgsql
and it succeeded:
Successfully installed 'EntityFramework6.Npgsql 6.4.0' to TestClient
Next, I installed the Npgsql integration for VS 2019 (found here). When I try to add an ADO.NET Entity Data Model to my project by right-clicking it in the solution explorer, I can add a connection and the connection test ist successful (done in the Wizard). I can go on and select my table, but as soon as I press Finish, I get an error:
This is the console output:
Unable to generate the model because of the following exception: 'System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> Npgsql.PostgresException: 42703: Column c.consrc does not exist
What can I do?