0
Delete a table from my project directly in Management Studio. Now when I run the application this error is returned:
system.data.sqlclient.sqlexception: Nome de objeto 'dbo.ContasPagarParcelas' inválido.
I cannot recreate the table. I am using Entity Framework.
You removed the table from the database but did not remove it from the EF context. If you doubt how to do this, post in your question the code of your context, where you define the Dbset of the table you removed.
– Rodrigo K.B
Rodrigo, I really want the table to be recreated. Deletes directly into the database to see what behavior the Entity would have when running the system again. Believed that the table would be recreated again.
– Gilberto V. Gonçalves
From what I understood in your reply, removing from context would be in case you no longer use this table, correct ?.
– Gilberto V. Gonçalves
You should use Codefrist, and you should do Migration, right? if you create Migrations, delete the migration files, and have them create one again. If it doesn’t work, in your database you have a table with migration history, you should delete
– Rodrigo K.B
Rodrigo, I managed to resolve as your guidelines. Thank you very much.
– Gilberto V. Gonçalves
òtimo, I am happy. If you can click on the orange arrow of my comment, which is on the left side, I thank you, because it punctuates my help. vlw!
– Rodrigo K.B
Rodrigo, sorry I can’t find the orange arrow.
– Gilberto V. Gonçalves
When you hover over my message, on the left side appears a triangle, just click on it.
– Rodrigo K.B
I put, as an answer, then you can click the V, which is on the left side of the answer, in this way we obey the flow of the site.
– Rodrigo K.B