How to setup .NET EF Core Sqlite (SSMS) Project - jr. dev

40 Views Asked by At

I am new to Visual Studio btw (I use VSC but assumed I needed VS for this assessment due to sln file).

I am running into difficulties with setting up an existing .NET EF Core project and database. Once I get the project connected, EntityFramework is constantly broken and I only seem to be able to make changes to the database by manually adjusting the migrations as they always try to create a new table which conflicts with the existing table.

Please tell me what I'm doing wrong.

Process I used to submit project:

  1. Restore DB via BAK file.
  2. Configure Connection string (which does pull the existing data).
  3. Make changes to Domain Models and ViewModels.
  4. Add Migration.
  5. Update db (fails due to existing table).
  6. Manually edit migration files.
  7. Update db (succeeds).
  8. Repeat 3 - 8 as needed.
0

There are 0 best solutions below