public Customer UpDate(UpDateCustomerOptions opt) { if (opt == null) { return(null); } var customer = SearchCustomers(new CustomerOptions() { CustomerId = opt.CustomerId, }).SingleOrDefault(); if (customer != null) { customer.FirstName = opt.FirstName; customer.LastName = opt.LastName; customer.IsActive = false; } return(customer); }
public IActionResult Update(UpDateCustomerOptions opt) { var result = customerService_.UpDate(opt); return(Json(result)); }