방금 람다 식을 배우기 시작했습니다. 람다 식 - 컬렉션에 추가하지 않을 경우
Customer customer = Customers.FirstOrDefault(c => c.ID == 3);
if (customer == null)
{
customer = new Customer() { FirstName = "Ben", LastName = "Foster", ID = 3 };
Customers.Add(customer);
}
// do something with customer
customer.CreateProfile();
은 기본적으로 내가 객체가 컬렉션에 있는지 확인하려면 :
이 가능 아래로 더 다음 코드를 단순화하는 것입니다. 작성하고 싶지 않다면 컬렉션에 추가하고 나중에 사용하십시오.
덕분에 벤 서면으로
나에게 잘 보이는 http://www.surcombe.com/nhibernate-1.2/api/html/N_Iesi_Collections.htm에서 Iesi.Collections를 살펴 보자. – mquander