Exemple #1
0
        // POST api/<controller>
        public async Task <IHttpActionResult> Post(ActionDto actionDto)
        {
            var errorMessage = await _actionValidator.ValidateAction(actionDto);

            if (!string.IsNullOrEmpty(errorMessage))
            {
                return(BadRequest(errorMessage));
            }
            return(Ok(await _actionsService.Add(actionDto)));
        }