예제 #1
0
        public IActionResult Works(int?id = null)
        {
            var model = new WorksVM
            {
                Projects = UnitOfWork.Projects.GetAllProjectListItems(),
                Project  = UnitOfWork.Projects.GetProjectById(id)
            };

            return(View(model));
        }
예제 #2
0
        public IActionResult Index(int number = 1, int size = 10, bool withDeleted = false)
        {
            var pages    = new PageVM(UnitOfWork.Projects.ProjectsCount(withDeleted), number, size);
            var projects = UnitOfWork.Projects.GetProjects(pages.Size, pages.Skip, withDeleted);
            var model    = new WorksVM
            {
                Projects    = projects,
                Pages       = pages,
                WithDeleted = withDeleted
            };

            return(View(model));
        }