TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
210 stars 53 forks source link

Is there any way to turn on suppressConnectionStringWarning option? #37

Closed meurig closed 5 years ago

meurig commented 5 years ago

I can see that GenerateOnConfiguring takes a very useful looking option: suppressConnectionStringWarning, which prevents a warning (That I'm trying to suppress) from being written.

But, the IServiceCollection.AddHandlebarsScaffolding method that I'm using doesn't appear to take any such option.

Is there another way that I'm missing to get that option turned on?

Many thanks!

tonysneed commented 5 years ago

Sorry for my late response. The EF Core CLI does not appear to have a flag in the dotnet ef dbcontext scaffold command for suppressing the connection string warning. However, the easiest way to do this is simply to remove {{{on-configuring}}} from the DbContext.hbs file.

tonysneed commented 5 years ago

Please re-open if this does not answer your question or if you have further questions.