DbEntityEntry.Cast<TEntity> Method ()

 

Returns a new instance of the generic DbEntityEntry<TEntity> class for the given generic type for the tracked entity represented by this object. Note that the type of the tracked entity must be compatible with the generic type or an exception will be thrown.

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

public DbEntityEntry<TEntity> Cast<TEntity>()
where TEntity : class

Return Value

Type: System.Data.Entity.Infrastructure.DbEntityEntry<TEntity>

A generic version.

Type Parameters

TEntity

The type of the entity.