You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When scaffolding an existing database into an mvc project, I noticed the OnModelCreating function doesn't contain the line base.OnModelCreating(modelBuilder) to call the base function. It seems to create confusions such as this: https://stackoverflow.com/q/53657924/991609
The text was updated successfully, but these errors were encountered:
@neville-nazerane This is by-design. OnModelCreating is a "pure" template method, so there is no need to call the DbContext implementation of it. If you derive from another type that may have code there, then calling it on that type usually makes sense, but that's a different scenario.
When scaffolding an existing database into an mvc project, I noticed the
OnModelCreating
function doesn't contain the linebase.OnModelCreating(modelBuilder)
to call the base function. It seems to create confusions such as this: https://stackoverflow.com/q/53657924/991609The text was updated successfully, but these errors were encountered: