IDbSet<TEntity>.Create 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.
Overloads
Create() |
Creates a new instance of an entity for the type of this set. Note that this instance is NOT added or attached to the set. The instance returned will be a proxy if the underlying context is configured to create proxies and the entity type meets the requirements for creating a proxy. |
Create<TDerivedEntity>() |
Creates a new instance of an entity for the type of this set or for a type derived from the type of this set. Note that this instance is NOT added or attached to the set. The instance returned will be a proxy if the underlying context is configured to create proxies and the entity type meets the requirements for creating a proxy. |
Create()
Creates a new instance of an entity for the type of this set. Note that this instance is NOT added or attached to the set. The instance returned will be a proxy if the underlying context is configured to create proxies and the entity type meets the requirements for creating a proxy.
public TEntity Create ();
abstract member Create : unit -> 'Entity
Public Function Create () As TEntity
Returns
The entity instance, which may be a proxy.
Applies to
Create<TDerivedEntity>()
Creates a new instance of an entity for the type of this set or for a type derived from the type of this set. Note that this instance is NOT added or attached to the set. The instance returned will be a proxy if the underlying context is configured to create proxies and the entity type meets the requirements for creating a proxy.
public TDerivedEntity Create<TDerivedEntity> () where TDerivedEntity : class, TEntity;
abstract member Create : unit -> 'DerivedEntity
Public Function Create(Of TDerivedEntity As {Class, TEntity}) () As TDerivedEntity
Type Parameters
- TDerivedEntity
The type of entity to create.
Returns
The entity instance, which may be a proxy.
Applies to
Entity Framework