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)))); }
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)); }