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

新的實體型別物件,或者是對應到實體型別的 Proxy 型別執行個體。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 的 Proxy 型別執行個體。An instance of the requested type T, or an instance of a proxy type that corresponds to the type T.

適用於