using (CustomerEntities customerDataContext= new CustomerEntities())
{
Customer customer = (from c in customerDataContext.Customers
where c.Name == "customer name"
selext c).First();
if(customer !=null)
{
c.Name = "New Customer Name";
}
customerDataContext.Customers.SaveChanges();
}