src/Shared/EntityFramework/DbSet.cs
/// <summary>
/// Returns the equivalent generic <see cref="DbSet{T}" /> object.
/// </summary>
/// <typeparam name="TEntity"> The type of entity for which the set was created. </typeparam>
/// <returns> The generic set object. </returns>
Returns the equivalent generic  object.
Returns the equivalent generic object .
public new DbSet<TEntity> Cast<TEntity>() where TEntity : class
        {
            if (InternalSet == null)
            {
                throw new NotSupportedException(Strings.TestDoublesCannotBeConverted);
            }
            if (typeof(TEntity) != InternalSet.ElementType)
            {
                throw Error.DbEntity_BadTypeForCast(
                    typeof(DbSet).Name, typeof(TEntity).Name, InternalSet.ElementType.Name);
            }
            return (DbSet<TEntity>)InternalSet.InternalContext.Set<TEntity>();
        }
public new DbSet < TEntity > Cast < TEntity > ( ) where TEntity : class { if ( InternalSet == null ) { throw new NotSupportedException ( Strings . TestDoublesCannotBeConverted ) ; } if ( typeof ( TEntity ) != InternalSet . ElementType ) { throw Error . DbEntity_BadTypeForCast ( typeof ( DbSet ) . Name , typeof ( TEntity ) . Name , InternalSet . ElementType . Name ) ; } return ( DbSet < TEntity > ) InternalSet . InternalContext . Set < TEntity > ( ) ; }
Returns the equivalent generic  object.
Returns the equivalent generic object .
The generic set object.
The generic set object .
typeparam
The type of entity for which the set was created.
The type of entity for which the set was created .