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)); }
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")); } }