Template Documentation
ExampleMoviesEntitiesOnModelCreating Method |
Overrides the base function to only throw an exception when is called, because this function is only called on a CodeFirst solution
Namespace: Template.Repository.Context
Assembly: Template.Repository (in Template.Repository.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
protected override void OnModelCreating( DbModelBuilder modelBuilder )
Parameters
- modelBuilder
- Type: DbModelBuilder
Used to a database schema
Exceptions
Exception | Condition |
---|---|
UnintentionalCodeFirstException | Throws when the function is called, because is a database first aproach |
See Also