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

Reverse Engineer: allow customizing the model after it is generated, before being passed to code gen #3077

Closed
rowanmiller opened this issue Sep 9, 2015 · 8 comments

Comments

@rowanmiller
Copy link
Contributor

We want a simple "seam" where folks can get the Model just before it is passed to code generation and manipulate it. This is particularly important since we are removing templating for the moment.

@natemcmaster
Copy link
Contributor

This is MetadataModelProvider.GetModel(). The method is virtual and can be overwritten.

@divega
Copy link
Contributor

divega commented Oct 15, 2015

I think this item was to track how the application developer would do it, not the provider. @rowanmiller?

@natemcmaster
Copy link
Contributor

Ah, yes. Who are "folks"?

@divega
Copy link
Contributor

divega commented Oct 15, 2015

😄

@divega
Copy link
Contributor

divega commented Oct 15, 2015

Reopening for now.

@divega divega reopened this Oct 15, 2015
@abelepereira
Copy link

I didn't undertand if templating via .cshtml is being definitely replaced for the GetModel() approach or if the @rowanmiller 's "for the moment" means it will come back on a later release.
The cshtml templating was actually a pretty nice way to enable [the unsupported] pluralization: https://empiricalthoughts.wordpress.com/2015/09/12/entity-framework-7-database-model-pluralization-part-22/

@divega
Copy link
Contributor

divega commented Nov 2, 2015

We have decided to leave the choice of a template based code-gen technology open for now. It is true that Razor enabled plugging in your own pluralization logic... after all you can do pretty much anything with it, but it also leads to complicated templates that mix concerns like this with the actual code generation. One of the ideas we decided to explore is to provide a hook that allows any customization of the model (covered by this issue) plus very simple code gen at the end that just binds to the resulting model and focuses only on what code to generate and its formatting.

@rowanmiller
Copy link
Contributor Author

Closing in favor of #4038

@rowanmiller rowanmiller removed this from the 7.0.0 milestone Dec 10, 2015
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants