Export (0) Print
Expand All

DbModelBuilder Methods

Entity Framework 5.0

The DbModelBuilder type exposes the following members.

  Name Description
Public method Build(DbConnection) Creates a DbModel based on the configuration performed using this builder. The connection is used to determine the database provider being used as this affects the database layer of the generated model.
Public method Build(DbProviderInfo) Creates a DbModel based on the configuration performed using this builder. Provider information must be specified because this affects the database layer of the generated model. For SqlClient the invariant name is 'System.Data.SqlClient' and the manifest token is the version year (for example, '2005' or '2008'.)
Public method ComplexType<TComplexType> Registers a type as a complex type in the model and returns an object that can be used to configure the complex type. This method can be called multiple times for the same type to perform multiple lines of configuration.
Public method Entity<TEntityType> Registers an entity type as part of the model and returns an object that can be used to configure the entity. This method can be called multiple times for the same entity to perform multiple lines of configuration.
Public method Equals Returns whether the specified model builder is equal to the current model builder. (Overrides Object.Equals(Object).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode Returns the hash function for the specified model builder. (Overrides Object.GetHashCode().)
Public method GetType Gets the type for the current model builder.
Public method Ignore(IEnumerable<Type>) Excludes a type or types from the model. This is used to remove types from the model that were added by convention during initial model discovery.
Public method Ignore<T>() Excludes a type from the model. This is used to remove types from the model that were added by convention during initial model discovery.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString Returns a string representation of the model builder. (Overrides Object.ToString().)
Top
Show:
© 2014 Microsoft