Пример #1
0
 public ProjectsListViewModel(IProjectRepository projectRepository, string category, int pageNo, int itemsPerPage)
 {
     _projectRepository = projectRepository;
     Projects = _projectRepository.ProjectsForCategory(category, pageNo - 1, itemsPerPage);
     TotalProjects = _projectRepository.TotalProjectsForCategory(category);
     CurrentCategory = category;
     PagingInfo = new PagingInfo
                      {
                          CurrentPage = pageNo,
                          ItemsPerPage = itemsPerPage,
                          TotalItems = TotalProjects,
                          CurrentCategory = category
                      };
 }