Ejemplo n.º 1
0
        public async Task <ApiResult <GeneralValorationViewModel> > GetValoration(string projectId)
        {
            var res = await _scratchService.Get_GeneralEvaluation(projectId);

            var model = new GeneralValorationViewModel((GeneralInfo)res.AdditionalInfo);

            return(ApiResult <GeneralValorationViewModel> .Initialize(model, true));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GeneralValoration(string projectjId)
        {
            try
            {
                var res =
                    await _scratchService.Get_GeneralEvaluation(projectjId);

                var model
                    = new GeneralValorationViewModel(
                          (GeneralInfo)res.AdditionalInfo);
                return(Ok(model));
            }
            catch (EvaluationException)
            {
                return(BadRequest("Id de proyecto inválido"));
            }
        }