0
我有一個linktoquerystring網頁asp.net API:linkLINQ到查詢字符串substringof
Asp.net控制器:
[HttpGet]
[LinqToQueryable]
[Route("")]
public IQueryable<ApplicationViewModel> All()
{
return _applicationRepository.All();
}
API網址:
http://localhost:61036/api/customers?$filter=substringof('s', name);
問題:API返回:
"message": "An error has occurred.",
"exceptionMessage": "Object reference not set to an instance of an object.",
"exceptionType": "System.NullReferenceException",