public async Task <HttpResult <ToggleMessageResponse> > Create(ToggleCreateMessageRequest request) { var retorno = new HttpResult <ToggleMessageResponse>(); if (request == null) { return(retorno.SetHttpStatusToBadRequest()); } var retornoTaskCreate = ToggleServiceTask.Create(MapToModelToggle.MapToModel(request), request.IdsServiceRota); retorno.Response = MapToResponseToggleMessage.MapToToggleMessageResponse(retornoTaskCreate.Response); retorno.Message = retornoTaskCreate.Message; return(retorno); }
private HttpResult <Toggle> CreateToggle(Toggle toggle, List <int> idsServiceRota) { return(taskToggle.Create(toggle, idsServiceRota)); }