-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net core $Expand->$filter Parsing is not supported #1087
Comments
@cqkisyouq : Can you also include the 'filterClause' details? Any call stack available for this error? It would be helpful for the investigation. Thanks. |
at Remotion.Linq.Parsing.Structure.MethodCallExpressionParser.GetNodeType(MethodCallExpression expressionToParse) |
Like this: var test = _applicationService.Get(query => query).Select(x => new The usage is wrong: |
@cqkisyouq - Looks like you are using the code in the maintenance-aspnetcore branch, correct? There are a few features not implemented in this branch. It's likely this feature will not be implemented in this branch. The feature/netcore branch (https://github.com/OData/WebApi/tree/feature/netcore) is being used to build a netcore version of OData WebApi will feature parity to the existing OData WebApi product. You can follow this work in #975. |
Yes. This has been answered by EF, and it is not supported by this method of analysis, but isn't it also used in this way? |
@robward-ms I'm using Microsoft.AspNetCore.OData 7.0.0-beta2 and it seems like this still isn't working. Ex request: My exception: |
@rmadisonhaynie - See #1221, I'll bet you are using EFCore 2.0.0 which does not support IQueryable. That said, EFCore overall has issues tracked in #669 |
Thank you @robward-ms that is correct. |
Expression filterSource =
typeof(IEnumerable).IsAssignableFrom(source.Type.GetProperty(propertyName).PropertyType)
? Expression.Call(
ExpressionHelperMethods.QueryableAsQueryable.MakeGenericMethod(clrElementType),
nullablePropertyValue)
: nullablePropertyValue;
$Expand Does not support this ".AsQuery.Where(xx) " ef parse error
var result = _userService.Get(query => query).Select(x=> new UserOutput{
Account=x.Account,
Alias=x.Alias,
Id=x.Id,
Email=x.Email,
Name=x.Name,
Mobile=x.Mobile,
DisplayOrder=x.DisplayOrder,
Description=x.Description,
Enabled=x.Enabled,
UpdatedOnUtc=x.UpdatedOnUtc,
CreatedOnUtc=x.CreatedOnUtc,
Roles=x.Roles.Where(r=>r.Enabled&&r.Deleted==false&&r.Role.Enabled&&r.Role.Deleted==false)
.Select(d=>new RoleOutput() {
Id=d.Role.Id,
ApplicationId=d.Role.ApplicationId,
Enabled=d.Role.Enabled,
DisplayOrder=d.Role.DisplayOrder,
Description=d.Role.Description,
CreatedOnUtc=d.Role.CreatedOnUtc,
UpdatedOnUtc=d.Role.UpdatedOnUtc
}).ToList()
});
The text was updated successfully, but these errors were encountered: