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

Example on Handlebars usage #683

Closed
statler opened this issue Apr 3, 2018 · 6 comments
Closed

Example on Handlebars usage #683

statler opened this issue Apr 3, 2018 · 6 comments

Comments

@statler
Copy link

statler commented Apr 3, 2018

Hi Erik

This is great work. So much better than the EF standard reverse engineering. I am really interested in what we can do with the Handlebars integration (specifically I am trying to achieve something like what is described in 640 with custom column names).

I am trying to figure out how to register a helper that will CamelCase all names coming from the database. Would it be possible to put a quick example in your readme?

@OmiCron07
Copy link

I need to know too because I have to add some custom code in the method OnModelCreating.

@ErikEJ
Copy link
Owner

ErikEJ commented Apr 4, 2018

I have some sample code here: #606 - not sure it helps with "OnModelCreating" - @OmiCron07 : Maybe if I added a partial method to the body of OnModelCreating?

 partial void OnModelCreatingExtension(modelBuilder);

@OmiCron07
Copy link

Could be a solution. For now, I created a new class which inherits from my DbContext and added "protected override void OnModelCreating(ModelBuilder modelBuilder)".

But my solution is not the cleanest because I have to create a third class for inheritance, in addition of the partial class of my DbContext and the refactoring of the codes using the data context.

If you add the partial method, I suppose I can implement it in my partial class of the DbContext?

@ErikEJ
Copy link
Owner

ErikEJ commented Apr 4, 2018

If you add the partial method, I suppose I can implement it in my partial class of the DbContext?

Yes, that was the idea

@ErikEJ
Copy link
Owner

ErikEJ commented Apr 28, 2018

Plan to fix in #695

@ErikEJ ErikEJ closed this as completed Apr 28, 2018
@ErikEJ
Copy link
Owner

ErikEJ commented Apr 28, 2018

@OmiCron07 Fixed in latest daily build

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

3 participants