src/Shared/EntityFramework/Infrastructure/DbQuery.cs
/// <summary>
/// Returns the equivalent generic <see cref="DbQuery{TElement}" /> object.
/// </summary>
/// <typeparam name="TElement"> The type of element for which the query was created. </typeparam>
/// <returns> The generic set object. </returns>
Returns the equivalent generic  object.
Returns the equivalent generic object .
public DbQuery<TElement> Cast<TElement>()
        {
            if (InternalQuery == null)
            {
                throw new NotSupportedException(Strings.TestDoublesCannotBeConverted);
            }
            if (typeof(TElement) != InternalQuery.ElementType)
            {
                throw Error.DbEntity_BadTypeForCast(
                    typeof(DbQuery).Name, typeof(TElement).Name, InternalQuery.ElementType.Name);
            }
            return new DbQuery<TElement>((IInternalQuery<TElement>)InternalQuery);
        }
public DbQuery < TElement > Cast < TElement > ( ) { if ( InternalQuery == null ) { throw new NotSupportedException ( Strings . TestDoublesCannotBeConverted ) ; } if ( typeof ( TElement ) != InternalQuery . ElementType ) { throw Error . DbEntity_BadTypeForCast ( typeof ( DbQuery ) . Name , typeof ( TElement ) . Name , InternalQuery . ElementType . Name ) ; } return new DbQuery < TElement > ( ( IInternalQuery < TElement > ) InternalQuery ) ; }
Returns the equivalent generic  object.
Returns the equivalent generic object .
The generic set object.
The generic set object .
typeparam
The type of element for which the query was created.
The type of element for which the query was created .