예제 #1
0
 public IActionResult UpdateInfos([FromBody] M.CustomerCreateUpdateModel customer)
 {
     if (_repository.Customers.FindByCondition(res => res.customerId == customer.customerId) == null)
     {
         return(NotFound());
     }
     return(new ObjectResult(_repository.Customers.Update(_mapper.Map <Customer>(customer))));
 }
예제 #2
0
        public IActionResult ModifyCustomer([FromBody] M.CustomerCreateUpdateModel customer)
        {
            if (_repository.Customers.FindByCondition(x => x.customerId == customer.customerId) == null)
            {
                return(NotFound());
            }

            var c = _repository.Customers.Update(_mapper.Map <Customer>((customer)));

            return(new ObjectResult(c));
        }