public async Task <IActionResult> GetAll() { try { if (!ModelState.IsValid) { return(BadRequest()); } var result = await _projectAppService.GetAll(); return(Ok(result)); } catch (ArgumentException ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message)); } }
public async Task <IEnumerable <ProjectViewModel> > GetProjects() { var projects = await projectAppService.GetAll(); return(projects); }
public async Task <IActionResult> Index() { var projects = await projectAppService.GetAll(); return(View(projects)); }