コード例 #1
0
        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);
        }
コード例 #2
0
 private HttpResult <Toggle> CreateToggle(Toggle toggle, List <int> idsServiceRota)
 {
     return(taskToggle.Create(toggle, idsServiceRota));
 }