예제 #1
0
 public async Task <ResponseDTO> DeleteCoordinates(DeleteLocationCoordinatesRequest location)
 {
     if (ModelState.IsValid)
     {
         return(await _locationApplicationService.DeleteLocationCoordinatesAsync(location));
     }
     return(ModelState.ToResponse());
 }
예제 #2
0
        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));
        }