TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

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

Constructors missing #32

Closed Goldman90 closed 5 years ago

Goldman90 commented 6 years ago

in advance, sorry about my bad english:

it seems like the constructor code is missing when scaffolding.

the code i'm talking specifically is this one

public SanitariosContext()
        {
        }

        public SanitariosContext(DbContextOptions<SanitariosContext> options)
            : base(options)
        {
        }

(in this example "SanitariosContext" is my dbcontext name)

tonysneed commented 5 years ago

@Goldman1337 So sorry for missing your question. The presence of one constructor is by design. The parameterless constructor is not needed because the context is created only via dependency injection, which supplies the context options.

Feel free to re-open if you would like to discuss further. Cheers!

tonysneed commented 5 years ago

@Goldman1337 Just realized I misread your question. :) I'll add the second constructor.