Пример #1
0
        public async Task <IActionResult> CreateEvaluationCriterion([FromBody] EvaluationCriteriaDto evaluationCriteriaDto)
        {
            var result = await _initiativeService.CreateEvaluationCriterion(evaluationCriteriaDto);

            if (result == true)
            {
                return(Ok());
            }
            return(BadRequest("Starting cycle failed"));
        }
        public async Task <bool> CreateEvaluationCriterion(EvaluationCriteriaDto evaluationCriteriaDto)
        {
            var newCriteria = _mapper.Map <EvaluationCriteria>(evaluationCriteriaDto);

            newCriteria.CreatedAt = DateTime.Now;

            var result = await _unitOfWork.EvaluationCriteria.CreateEvaluationCriterion(newCriteria);

            return(result);
        }