public IActionResult Update([FromBody] MovementRescueDTO movementRescueDTO) { if (movementRescueDTO == null) { return(NotFound()); } MovementRescue movementRescue = movementRescueDTO.ConvertMovementRescueDTOToMovementRescue(); return(Execute(() => _baseMovementRescueService.Update(movementRescue))); }
public IActionResult Create([FromBody] MovementRescueDTO movementRescueDTO) { if (movementRescueDTO is null) { throw new ArgumentNullException(nameof(movementRescueDTO)); } if (movementRescueDTO == null) { return(NotFound()); } MovementRescue movementRescue = movementRescueDTO.ConvertMovementRescueDTOToMovementRescue(); return(Execute(() => _baseMovementRescueService.Add <Customer>(movementRescue).Id)); }