예제 #1
0
        public IActionResult Index()
        {
            List <Project>   P   = projectrepo.GetAllProjects();
            ProjectViewModel Pro = new ProjectViewModel(P);

            return(View(Pro));
        }
예제 #2
0
        public List <Project> GetAllProjects()
        {
            ProjectRepo    projectRepository = new ProjectRepo();
            List <Project> projects          = projectRepository.GetAllProjects();

            return(projects);
        }
예제 #3
0
 public IActionResult List()
 {
     return(new OkObjectResult(projectRepo.GetAllProjects()));
 }
예제 #4
0
        private Task <List <Project> > GetAllProjectsAsync()
        {
            ProjectRepo projList = new ProjectRepo(context);

            return(Task.FromResult(projList.GetAllProjects().ToList()));
        }