[HttpPost, Route("deleteHouseService")] //, AmigoTenantClaimsAuthorize(ActionCode = ConstantsSecurity.ActionCode.HouseDelete)] public async Task <ResponseDTO> DeleteHouseService(DeleteHouseServiceRequest houseService) { if (ModelState.IsValid) { return(await _houseApplicationService.DeleteHouseServiceAsync(houseService)); } return(ModelState.ToResponse()); }
public async Task <ResponseDTO> DeleteHouseServiceAsync(DeleteHouseServiceRequest houseService) { //Map to Command var command = _mapper.Map <DeleteHouseServiceRequest, DeleteHouseServiceCommand>(houseService); //Execute Command var resp = await _bus.SendAsync(command); return(ResponseBuilder.Correct(resp)); }