Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DbSet<TEntity>::Create Method

 

Namespace:   System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodCreate()

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.

System_CAPS_pubmethodCreate<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.

Return to top

DbSet<TEntity>::Create Method ()

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:
virtual TEntity Create()

Return Value

Type: TEntity

Return to top

DbSet<TEntity>::Create<TDerivedEntity> Method ()

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:
generic<typename TDerivedEntity>
where TDerivedEntity : ref class, TEntity
virtual TDerivedEntity Create()

Return Value

Type: TDerivedEntity

Type Parameters

TDerivedEntity

The type of entity to create.

Return to top
Show: