ObjectQuery<T>.OfType<TResultType> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Limits the query to only results of a specific type.
public System.Data.Entity.Core.Objects.ObjectQuery<TResultType> OfType<TResultType> ();
member this.OfType : unit -> System.Data.Entity.Core.Objects.ObjectQuery<'ResultType>
Public Function OfType(Of TResultType) () As ObjectQuery(Of TResultType)
Type Parameters
- TResultType
The type of the ObjectResult<T> returned when the query is executed with the applied filter.
Returns
ObjectQuery<TResultType>
A new ObjectQuery<T> instance that is equivalent to the original instance with OFTYPE applied.
Exceptions
The type specified is not valid.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework