ObjectSet<TEntity>.CreateObject Method

 

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

NameDescription
System_CAPS_pubmethodCreateObject()

Creates a new entity type object.

System_CAPS_pubmethodCreateObject<T>()

Creates an instance of the specified type.


ObjectSet<TEntity>.CreateObject Method ()

Creates a new entity type object.

public TEntity CreateObject()

Return Value

Type: TEntity

The new entity type object, or an instance of a proxy type that corresponds to the entity type.


ObjectSet<TEntity>.CreateObject<T> Method ()

Creates an instance of the specified type.

public T CreateObject<T>()
where T : class, TEntity

Return Value

Type: T

An instance of the requested type T , or an instance of a proxy type that corresponds to the type T .

Type Parameters

T

Type of object to be returned.