DbEntityEntry.Cast<TEntity> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回這個 物件所表示之追蹤實體之指定泛型型別之泛型 DbEntityEntry<TEntity> 類別的新實例。 請注意,追蹤實體的類型必須與泛型型別相容,否則會擲回例外狀況。
public System.Data.Entity.Infrastructure.DbEntityEntry<TEntity> Cast<TEntity> () where TEntity : class;
member this.Cast : unit -> System.Data.Entity.Infrastructure.DbEntityEntry<'Entity (requires 'Entity : null)> (requires 'Entity : null)
Public Function Cast(Of TEntity As Class) () As DbEntityEntry(Of TEntity)
類型參數
- TEntity
實體的型別。
傳回
泛型版本。