title: Web Api OData v3 - Cast or IsOf Function must have a type in its arguments
body: <p>I have a base entity (<code>Store</code>), with two other types that implement it (<code>Customer</code>, <code>Engineer</code>).</p>
  
  <p>However when I try to filter for a certain type:</p>
  
  <pre><code>http://localhost:50050/odata/Store?$inlinecount=allpages&amp;$top=20&amp;$filter=isof(MyNamespace.Data.Core.Entities.Engineer)&amp;$orderby=Name%20asc
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>{
    "odata.error":{
      "code":"","message":{
        "lang":"en-US","value":"The query specified in the URI is not valid. Cast or IsOf Function must have a type in its arguments."
      },"innererror":{
        "message":"Cast or IsOf Function must have a type in its arguments.","type":"Microsoft.Data.OData.ODataException","stacktrace":"   at Microsoft.Data.OData.Query.FunctionCallBinder.ValidateIsOfOrCast(BindingState state, Boolean isCast, List`1&amp; args)\r\n   at Microsoft.Data.OData.Query.FunctionCallBinder.CreateUnboundFunctionNode(FunctionCallToken functionCallToken, List`1 args, BindingState state)\r\n   at Microsoft.Data.OData.Query.FunctionCallBinder.BindAsBuiltInFunction(FunctionCallToken functionCallToken, BindingState state, List`1 argumentNodes)\r\n   at Microsoft.Data.OData.Query.FunctionCallBinder.BindFunctionCall(FunctionCallToken functionCallToken, BindingState state)\r\n   at Microsoft.Data.OData.Query.MetadataBinder.BindFunctionCall(FunctionCallToken functionCallToken)\r\n   at Microsoft.Data.OData.Query.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.Data.OData.Query.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.Data.OData.Query.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.Data.OData.Query.MetadataBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.Data.OData.Query.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.Data.OData.Query.FilterBinder.BindFilter(QueryToken filter)\r\n   at Microsoft.Data.OData.Query.ODataUriParser.ParseFilterImplementation(String filter, IEdmType elementType, IEdmEntitySet entitySet)\r\n   at System.Web.Http.OData.Query.FilterQueryOption.get_FilterClause()\r\n   at System.Web.Http.OData.Query.Validators.FilterQueryValidator.Validate(FilterQueryOption filterQueryOption, ODataValidationSettings settings)\r\n   at System.Web.Http.OData.Query.FilterQueryOption.Validate(ODataValidationSettings validationSettings)\r\n   at System.Web.Http.OData.Query.Validators.ODataQueryValidator.Validate(ODataQueryOptions options, ODataValidationSettings validationSettings)\r\n   at System.Web.Http.OData.Query.ODataQueryOptions.Validate(ODataValidationSettings validationSettings)\r\n   at System.Web.Http.OData.EnableQueryAttribute.ValidateQuery(HttpRequestMessage request, ODataQueryOptions queryOptions)\r\n   at Vantage.Web.Api.Filters.AuthorizeQueryAttribute.ValidateQuery(HttpRequestMessage request, ODataQueryOptions queryOptions) in c:\\Users\\TimM\\Source\\Workspaces\\Workspace\\Vantage Web Prototype - API\\Vantage.Web.Api\\Filters\\AuthorizeQueryAttribute.cs:line 29\r\n   at System.Web.Http.OData.EnableQueryAttribute.ExecuteQuery(Object response, HttpRequestMessage request, HttpActionDescriptor actionDescriptor)\r\n   at System.Web.Http.OData.EnableQueryAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)"
      }
    }
  }
  </code></pre>
  
  <p>Why would this be happening? I have used the exact type being returned with the entity.</p>
  
  <pre><code>"odata.type":"MyNamespace.Data.Core.Entities.Engineer"
  </code></pre>
  
  <p>I am using Web Api 5.2.2, OData 5.3.1. Thanks for any help!</p>