Skip to content

Conversation

gabidabet
Copy link
Contributor

@gabidabet gabidabet commented Sep 11, 2023

Scaffold-DbContext "User ID=postgres;Password=xxxx;Host=localhost;Port=5432;Database=Adventureworks;Pooling=true;MinPoolSize=0;MaxPoolSize=100;Connection Lifetime=0;" Npgsql.EntityFrameworkCore.PostgreSQL

Running that command to generate models for database, causes the following error using version 6.0.0 of Npgsql.EntityFrameworkCore.PostgreSQL and version 6.0.21 of Microsoft.EntityFrameworkCore.Design

The types of the properties specified for the foreign key {'Departmentid' : short} on entity type 'Employeedepartmenthistory (Dictionary<string, object>)' do not match the types of the properties in the principal key {'Departmentid' : int} on entity type 'Department (Dictionary<string, object>)'. Provide properties that use the same types in the same order.

The types of the properties specified for the foreign key {'Departmentid' : short} on entity type 'Employeedepartmenthistory (Dictionary<string, object>)' do not match the types of the properties in the principal key {'Departmentid' : int} on entity type 'Department (Dictionary<string, object>)'. Provide properties that use the same types in the same order.
@morenoh149 morenoh149 merged commit e9f9909 into morenoh149:master Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants