public async Task <ResponseDTO> DeleteCoordinates(DeleteLocationCoordinatesRequest location) { if (ModelState.IsValid) { return(await _locationApplicationService.DeleteLocationCoordinatesAsync(location)); } return(ModelState.ToResponse()); }
public async Task <ResponseDTO> DeleteLocationCoordinatesAsync(DeleteLocationCoordinatesRequest location) { //Map to Command var command = _mapper.Map <DeleteLocationCoordinatesRequest, DeleteLocationCoordinatesCommand>(location); //Execute Command var resp = await _bus.SendAsync(command); return(ResponseBuilder.Correct(resp)); }