L
L
Lev Fedorov2019-11-18 13:54:44
PostgreSQL
Lev Fedorov, 2019-11-18 13:54:44

Why are model changes not being applied in the database?

I am writing a project using .Net Core 3 using EF Core and Net Core Identity. Created a user model and inherited it from the IdentityUser class. Why fields that are specified in the User model do not appear in the database? When trying to add a migration or enable migrations, VS writes

The EntityFramework package is not installed on project ""
Although EF Core works

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2019-11-18
@blvckheart0

Most likely, you need to specify the target project (where the migrations will be written) and the start project (where the settings will be taken from). If you have everything in one project, then write the same:
And if you have postgresql, then you need to add a package under it

D
Dartware, 2019-11-18
@dartware

For migrations to work, just having EF Core installed is not enough.
You need to install the package Microsoft.EntityFrameworkCore.Tools

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question