Can I restore discarded files from Visual studio git changes?

I accidentally discarded files that generated migrations. I have migration code, I lost the rest of the files.

Is there a way to restore it?

>Solution :

The discarded not committed code is lost.

If you have migrations, you can migrate in a database and generate your Model POCO files with EDMX.

https://docs.microsoft.com/en-us/ef/ef6/modeling/designer/workflows/database-first

Leave a Reply