Example #1
0
        private string BuildCourier()
        {
            var courierDto = new CourierDtoSave
            {
                FirstName = "Albert",
                LastName  = "Einstein",
                Phone     = "7777777"
            };

            return(JsonConvert.SerializeObject(courierDto));
        }
Example #2
0
        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));
        }
Example #3
0
        public async Task <IActionResult> UpdateAsync(CourierDtoSave courier)
        {
            await _courierService.UpdateCourierAsync(courier);

            return(Accepted());
        }