에 대한 .ANY()를 사용할 수 없습니다 I 컨트롤러에서 다음 코드, 내가 response.Customers.Any를 (사용하고자하는 목록일반적인 목록
을 반환 서비스 동작을)를 호출하고, 같이가 난 특정 고객을 찾고있을 것입니다. 하지만 가끔은. 아무 것도 없습니다. .Any()를 사용할 때 컴파일 오류가 발생합니다.
내가 작업을 호출하는 방식에 따라 다르면 확실하지 않습니까? 난 항상 우리가 일반 목록 .ANY()를 사용할 수 있다고 생각하기 때문에
컨트롤러
public class Customer
{
public Customer(ICustomerService customerService)
{
this.CustomerService = customerService;
}
private ICustomerService CustomerService { get; set; }
var response = this.ExecuteServiceCall(() => this.CustomerService.getCustomerResults());
response.customers.Any(x => x.group == "A");
}