Last post Jun 02, 2017 08:23 AM by PatriceSc
Jun 01, 2017 11:48 AM|mark1961|LINK
i have updated a model with a new field and now my database has lost all its data...
ive ran the add-migrations and update-database command in the console but this hasnt had any effect.
how can i get my data back? the console informs me the seed method has run so im confused as to why i have no data
Jun 02, 2017 08:07 AM|Eric Du|LINK
According to your description, as far as I know, if the seed method has run, it should have data in database. So I am not clear you how to add a new field to the database, I hope you could give us a detail description and code.
Also here is a tutorial about how to add a field to the database, please check:
Adding a New Field to the Movie Model and Table:
Jun 02, 2017 08:23 AM|PatriceSc|LINK
Could it be that you have a DropCreateDatabaseAlways EF strategy configured in your app ??? IKf the database has been really dropped /created short of using a backup if you have one, I don't see what could be done.