-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
[Question] OrderBy does not work with nullable navigation properties #400
Comments
Hello @khallid-itdevtech , Do you think you could provide a project sample with this issue? It will help my developer investigate the issue more efficiently. We already tried once but everything was working, so we might miss something. We now always ask for a project sample even if the issue is easy to reproduce. As a free product, we must find some way to save time to offer an overall better experience for everyone and release fixes faster. You can send it to: [email protected] if you need to keep the source private Best Regards, Jonathan Performance Libraries Runtime Evaluation |
I think the site is a nullable navigation property in this question. So you cannot use The solution is to use the NullPropagating (np) function, so I think this code should solve the issue list = list.AsQueryable().OrderBy("np(site.title) asc" ).ToList(); |
I was getting a different error when the I guess we will see with his answer ;) |
@StefH Thanks |
OrderBy works fine on non nullable navigation properties but if navigation property is nullable it doesn't work
System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseArgumentList() in ExpressionParser.cs, line 1851
list = list.AsQueryable().OrderBy("site.title asc" ).ToList();
site is nullable navigation property
The text was updated successfully, but these errors were encountered: