asp.net 및 LINQ 쿼리를 처음 사용했습니다. 다음 쿼리를 작성했지만 오류가 발생했습니다. 위의 질문에LINQ 오류 포함
Include path expression must refer to a navigation property defined on the type
같은 오류가 있지만 전혀 일어나고 왜 설명하지 않습니다. 아래의 세 번째 줄에 인라인 .First() 메서드를 포함했기 때문에 그것이라고 믿지만 다시 왜 이것이 발생하고 그것이 무엇을 의미하는지 알고 싶습니다. 도와 줘서 고마워.
오류 :
이The Include path expression must refer to a navigation property defined on the
type. Use dotted paths for reference navigation properties and the Select
operator for collection navigation properties.
Parameter name: path
검색어 :
IQueryable<User> users = db.Users
.Where(u => u.Email == email)
.Include(cu => cu.CompanyUsers.First())
.Include(c => c.Companies)
.Include(p => p.ParentCompanyAccounts);
'사용자'정의를 표시 할 수 있습니까? –
데이터 모델? – Ellery
예, 데이터 모델입니다. –