public bool Update(Customers customer) { try { //var entry = _ctx.Entry(product); //customer.CustomerID = CustomerID; _ctx.Set<Customers>().Attach(customer); _ctx.Entry(customer).State = EntityState.Modified; return true; } catch { return false; } }
public bool Insert(Customers customer) { try { _ctx.Customers.Add(customer); return true; } catch { return false; } }