Пример #1
0
        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);
        }
Пример #2
0
        public IActionResult Update(UpDateCustomerOptions opt)
        {
            var result = customerService_.UpDate(opt);

            return(Json(result));
        }