DbSet.Create Method

 

Creates a new instance of an entity for the type of this set.

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(Type)

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.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 object Create()

Return Value

Type: System.Object

The entity instance, which may be a proxy.

Return to top

DbSet.Create Method (Type)

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 virtual object Create(
	Type derivedEntityType
)

Parameters

derivedEntityType
Type: System.Type

The type of entity to create.

Return Value

Type: System.Object

The entity instance, which may be a proxy.

Return to top
Show: