를 인식하지 못합니다 아래 코드 :LINQ 내가 개체 아래에있는 방법 System.Collections.Generic.List
return context.Persons.Select(x => new Model.Person
{
PersonId = x.PersonId,
Name = x.FirstName,
LastName = x.LastName,
Phones = x.Addresses.Where(a => a.AddressSubTypeId == 1).Select(a => new Model.Phone
{
PhoneId = a.AddressId,
Name = a.CompleteAddress
}).ToList(),
Emailes = x.Addresses.Where(a => a.AddressSubTypeId == 2).Select(a => new Model.Email
{
EmailId = a.AddressId,
Name = a.CompleteAddress
}).ToList()
}).ToList();
나는 오류 아래에 제기 표현 이상 실행하면 :
LINQ to Entities에서 'System.Collections.Generic.List
1[Model.Phone] ToList[Phone](System.Collections.Generic.IEnumerable
1 [Model.Phone]'메서드를 인식하지 못하고이 메서드를 저장소 식으로 변환 할 수 없습니다.