나는 다음과 같은 EF 표현이 : 설정시EF 선택 선택
var complexes = db.ResidentialComplexes.AsNoTracking()
.Where(rc => rc.MasterEntity == entity)
.Select(rc => new CustomComplexObj()
{
ComplexId = rc.ComplexId,
Name = rc.Name,
Region = rc.Region,
Properties = rc.CurrentProperties.Select(p=> new CustomPropertyObj(){
Name = p.Name,
PropertyId = p.PropertyId
}).ToList()
}).ToList();
임에 오류가 점점 : 엔티티에
LINQ는하지 않습니다 :
Properties = rc.CurrentProperties.Select(p=> new CustomPropertyObj(){
Name = p.Name,
PropertyId = p.PropertyId
}).ToList()
이 오류입니다 'System.Collections.Generic.List 1[CondoTrack.Model.Poco.CustomPropertyObj] ToList[CustomPropertyObj](System.Collections.Generic.IEnumerable
1 [CondoTrack.Model.Poco.CustomPropertyObj]'메서드를 인식하고이 메서드를 sto로 변환 할 수 없습니다. 다시 표현.
원하는 결과를 얻는 방법에 대한 단서가 있습니까?
무엇이 오류입니까? – CodingGorilla