DbSet.Cast(Of TEntity) Method

Entity Framework 5.0

Returns the equivalent generic DbSet(Of TEntity) object.

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

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

returnValue = instance.Cast()

Type Parameters

TEntity

The base type of the object to be cast to the generic set object.

Return Value

Type: System.Data.Entity.DbSet(Of TEntity)
The generic set object.
Show: