최근에 Entity Framework의 구문을 다음과 같이 보았습니다. where 문에 주목하십시오 -Entity Framework (QueryBuilder) - where 절 "it"prefix
.Where("it.LastName = @ln AND it.FirstName = @fn")
it.
의 기능은 무엇입니까? 그리고 Contacts.LastName 대신 it
이 필요한 이유는 무엇입니까? 자세한 정보가 도움이 될 것입니다. 미리 감사드립니다.
string firstName = @"Frances";
string lastName = @"Adams";
using (AdventureWorksEntities context =
new AdventureWorksEntities())
{
// Get the contacts with the specified name.
ObjectQuery<Contact> contactQuery = context.Contacts
.Where("it.LastName = @ln AND it.FirstName = @fn",
new ObjectParameter("ln", lastName),
new ObjectParameter("fn", firstName));
// Iterate through the collection of Contact items.
foreach (Contact result in contactQuery)
Console.WriteLine("Last Name: {0}; First Name: {1}",
result.LastName, result.FirstName);
}
'내'절에 접두어를 붙일 필요가 없었습니다 .... – c0deNinja
EF 버전은 무엇입니까? – c0deNinja
EF 4 - 여기 msdn article - http://msdn.microsoft.com/en-us/library/bb896238.aspx – bugBurger