ObjectQuery<T>.OfType<TResultType> Method ()
Limits the query to only results of a specific type.
Assembly: EntityFramework (in EntityFramework.dll)
Return Value
Type: System.Data.Entity.Core.Objects.ObjectQuery<TResultType>A new ObjectQuery<T> instance that is equivalent to the original instance with OFTYPE applied.
Type Parameters
- TResultType
The type of the ObjectResult<T> returned when the query is executed with the applied filter.
Exception | Condition |
---|---|
EntitySqlException | The type specified is not valid. |