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?
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.