customer object
public class customer
Code:
{
private int _CustomerID;
private string _Ad;
private string _Email;
//public properties comes here
}
there is a customer record in database which customerID is 1.
and i want to update only email adres of the customer1.
i am using asp.net and i don't want to get (select) the object before update the email address bu below code block is not work.
Code:
CustomerRepository cr = new CustomerRepository();
Customer c = new Customer();
c.CustomerID = 1;
c.Email= "customer1@newemail.com";
cr.Save(c);
are there any resolution.
i think nhibernate can follow the properties and when i am updating it will update only properties which are setted to a new value (set block executed)