public bool Update(int id, Customer cus)
        {
            try
            {
                using (ManageCustomersEntities ctx = new ManageCustomersEntities())
                {
                    var _ob = ctx.Customers.SingleOrDefault(b => b.ID == id);
                    if (_ob != null)
                    {
                        _ob.Name = cus.Name.Trim();
                        _ob.Phone = cus.Phone.Trim();
                        _ob.Email = cus.Email.Trim();
                        _ob.Address = cus.Address.Trim();
                        ctx.SaveChanges();
                    }
                }

                return true;

            }
            catch
            {
                return false;
            }
        }
 public bool Insert(Customer cus)
 {
     try
     {
         ManageCustomersEntities ctx = new ManageCustomersEntities();
         ctx.Customers.Add(cus);
         ctx.SaveChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }
 public HttpResponseMessage Post(Customer customer)
 {
     var cusDLL = new CusDLL();
     if (customer.ID == 0)
     {
         cusDLL.Insert(customer);
     }
     else
     {
         cusDLL.Update( customer,customer.ID);
     }
    HttpResponseMessage response = Request.CreateResponse<Customer>(System.Net.HttpStatusCode.Created, customer);
     return response;
 }
 public void Update(Customer cus, int id)
 {
     CustomerDal CusDAL = new CustomerDal();
     CusDAL.Update( id,cus);
 }
 public void Insert(Customer cus)
 {
     CustomerDal CusDAL = new CustomerDal();
 }