Share via


IDbSet<TEntity>.Create Method

Definition

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

TEntity

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

TDerivedEntity

The entity instance, which may be a proxy.

Applies to