DbModelBuilder.Entity<TEntityType> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 virtual System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType> Entity<TEntityType> () where TEntityType : class;
abstract member Entity : unit -> System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<'EntityType (requires 'EntityType : null)> (requires 'EntityType : null)
override this.Entity : unit -> System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<'EntityType (requires 'EntityType : null)> (requires 'EntityType : null)
Public Overridable Function Entity(Of TEntityType As Class) () As EntityTypeConfiguration(Of TEntityType)
Type Parameters
- TEntityType
The type to be registered or configured.
Returns
The configuration object for the specified entity type.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for