DbSet(TEntity).Create(TDerivedEntity) Method

Entity Framework 5.0

Creates a new instance of an entity for the type of this set or for a type derived from the type of this set. 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.

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

abstract Create : unit -> 'TDerivedEntity  when 'TDerivedEntity : not struct and 'TEntity
override Create : unit -> 'TDerivedEntity  when 'TDerivedEntity : not struct and 'TEntity

Type Parameters

TDerivedEntity

The type that defines the set.

Return Value

Type: TDerivedEntity
Returns [{0}].
Show: