ObjectSet<TEntity>.CreateObject 方法

定义

重载

CreateObject()

创建一个新的实体类型对象。Creates a new entity type object.

CreateObject<T>()

创建指定类型的实例。Creates an instance of the specified type.

CreateObject()

创建一个新的实体类型对象。Creates a new entity type object.

public:
 TEntity CreateObject();
public TEntity CreateObject ();
member this.CreateObject : unit -> 'Entity
Public Function CreateObject () As TEntity

返回

TEntity

与实体类型对应的新实体类型对象或代理类型的实例。The new entity type object, or an instance of a proxy type that corresponds to the entity type.

CreateObject<T>()

创建指定类型的实例。Creates an instance of the specified type.

public:
generic <typename T>
 where T : class, TEntity T CreateObject();
public T CreateObject<T> () where T : class, TEntity;
member this.CreateObject : unit -> 'T
Public Function CreateObject(Of T As {Class, TEntity}) () As T

类型参数

T

要返回的对象的类型。Type of object to be returned.

返回

T

T 类型对应的已请求类型 T 的实例或代理类型的实例。An instance of the requested type T, or an instance of a proxy type that corresponds to the type T.

适用于