示例#1
0
        public void UpdateCustomer(int id, CustomerUpdateDto customer)
        {
            var cus = GetCustomer(id);

            cus.FirstName = customer.FirstName;
            cus.LastName  = customer.LastName;
            cus.Email     = customer.Email;
            cus.Phone     = customer.Phone;

            context.SaveChanges();
        }
 public void Delete(Admin admin)
 {
     context.Admins.Remove(admin);
     context.SaveChanges();
 }
 public void Remove(Appointment appt)
 {
     context.Appointments.Remove(appt);
     context.SaveChanges();
 }