Blumonde

Blumonde

  • 2k
  • 78
  • 22.6k

MVC Crud Ado Model EF

Jul 24 2016 8:50 PM
Hello, 
 
Everytime I build a new crud on a table from the SAME database via the Model folder, MVC Ado Model EF wants to create a new connectionstring in web.config. Scaffolding via the Controller folder will not work if I force Ado Model EF to use the existing connectionstring in web.config. Scaffolding will only work if I allow Ado Model EF to create a new connectionstring in web.config.
 
Can someone please explain to me why does MVC do this? And what should I do in this case? I have like a hundred tables in the same database. Does it mean I have to have 100 connectionstrings in web.config? This is ridiculous if this is how Microsoft built MVC.
 
Thanks in advance. 

Answers (3)