This article is a mirror article of machine translation, please click here to jump to the original article.

View: 23694|Reply: 1

[Source] PartialEvaluationExceptionExpression

[Copy link]
Posted on 8/30/2016 2:30:15 PM | | |
 Landlord| Posted on 10/22/2019 2:48:20 PM |
The code you're running is getting the value of a null object, so that object is thrown as well. When a query provider tries to convert that query into something that the database can do, it needs to parse Model.date.Value.Date as its value so that it can use that value in the query. Since there is no value, the code breaks.

The solution is of course not to inline such checks into the query itself. Outside of the query context, determine if this check should be added, and then add it only when needed:

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com