DbEntityEntry.Cast(Of TEntity) Method

Entity Framework 5.0

Returns a new instance of the generic DbEntityEntry(Of TEntity) class for the given generic type for the tracked entity represented by this object. 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)

'Declaration
Public Function Cast(Of TEntity As Class) As DbEntityEntry(Of TEntity)
'Usage
Dim instance As DbEntityEntry 
Dim returnValue As DbEntityEntry(Of TEntity)

returnValue = instance.Cast()

Type Parameters

TEntity

The type of the entity.

Return Value

Type: System.Data.Entity.Infrastructure.DbEntityEntry(Of TEntity)
A generic version.
Show: