0
관련 (간체) 클래스 다른 목록에 표시됩니다. 따라서 rsearch.hosts
에있는 모든 호스트에 대해 rsearch.hostservices
에 모든 서비스가 필요합니다.점검
rsearch.hostservices = db.Services
.Where(j => rsearch.hosts.Select(c => c.HostID).Contains(j.HostID)).ToList();
하지만 항상 다음과 같은 오류
System.NotSupportedException: Unable to create a constant value of type 'xxx.Models.Host'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
이 답변이 다른 점에 대해 몇 가지 설명과 함께 더 나은 것 얻을 :
이
내가 지금 무엇을 묻는 사람의 쿼리 및 그가 겪고있는 오류를 어떻게 해결 하는지를 보여줍니다. –