Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could existing model deletion be delayed until models are generated successfully? #227

Open
tompipe opened this issue Nov 5, 2019 · 1 comment

Comments

@tompipe
Copy link

tompipe commented Nov 5, 2019

Looking at the GenerateModels method in ModelsBuilderBackOfficeController, any *.generated.cs files are deleted before an attempt is made to generate models.

If the models generation then subsequently fails, the solution refuses to build as no models exist.

Would it be possible to delay deletion of existing models, until new models have been successfully generated?

@ronaldbarendse
Copy link

This sounds like a reasonable request, although I think it will result in people not realising an error occurred and use the out of date models...

This could be resolved by generating a warning (e.g. add an Obsolete("This generated model is out of date") attribute for every type or a single #warning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants