MVC 5 Changing Table Names
I'm using MVC 5 to create a web based application with the stored backend in an MSSQL database via SQLEXPRESS in SQL Server 2014.
I was going through my code and had found that the table name was incorrect, I had it labeled EngineOIHomes when it should be EngineOIHome. So I changed it in all places in the solution, via find and replace all, and then renamed that table in the SQL 2014 Managament studio to EngineOIHome, from EngineOIHomes.
Now when I try to run the solution I get an error in the index when it references the model to try and display the data from the table. It's trying to reference the old table name dbo.EngineOIHomes rather than dbo.EngineOIHome.
I've done a search in the entire solution for EngineOIHomes and it comes up with nothing. I've tried the migration method to recreate the database in
https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/adding-a-new-field
but that didn't fix the problem either. Is there something in particular I need to do when I change table names in the database and their respective code so that it'll reference the correct table?
0 comments:
Post a Comment