private string BuildCourier() { var courierDto = new CourierDtoSave { FirstName = "Albert", LastName = "Einstein", Phone = "7777777" }; return(JsonConvert.SerializeObject(courierDto)); }
public Task UpdateCourierAsync(CourierDtoSave courierDtoSave) { if (courierDtoSave == null) { throw new CourierDomainException("Courier is null"); } var courier = _mapper.Map <Model.Courier>(courierDtoSave); return(_courierRepository.UpdateCourierAsync(courier)); }
public async Task <IActionResult> UpdateAsync(CourierDtoSave courier) { await _courierService.UpdateCourierAsync(courier); return(Accepted()); }