public ActionResult <IEnumerable <Project> > Get() { try { return(Ok(_repository.GetAllProjects())); } catch (Exception e) { _logger.LogError($"Failed to get products: {e}"); return(BadRequest("Failed to get products")); } }
public IActionResult Dashboard() { var projects = _repository.GetAllProjects(); return(View(projects)); }