Quantcast
Channel: How to update the model when using database first approach - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by ish1313 for How to update the model when using database first approach

$
0
0

you may

  1. rename folder with scaffolded clasess let's say model->model1
  2. scaffold database with original command
  3. delete model1 folder

but if you have any changes in /model folder you will lose them. i am keeping /Model folder nearly intact and have all changes in /Partial folder (partial classes).

the only thing i need to change manually after rescaffolding isto remove constructor and onconfiguring (etc) from newly created dbcontext class, because i am keeping this code in partial class


Viewing all articles
Browse latest Browse all 13

Trending Articles