public IActionResult Index() { List <Project> P = projectrepo.GetAllProjects(); ProjectViewModel Pro = new ProjectViewModel(P); return(View(Pro)); }
public List <Project> GetAllProjects() { ProjectRepo projectRepository = new ProjectRepo(); List <Project> projects = projectRepository.GetAllProjects(); return(projects); }
public IActionResult List() { return(new OkObjectResult(projectRepo.GetAllProjects())); }
private Task <List <Project> > GetAllProjectsAsync() { ProjectRepo projList = new ProjectRepo(context); return(Task.FromResult(projList.GetAllProjects().ToList())); }