Esempio n. 1
0
 public ProjectsListViewModel(IProjectRepository projectRepository, int pageNo, int itemsPerPage)
 {
     _projectRepository = projectRepository;
     Projects = _projectRepository.Projects(pageNo - 1, itemsPerPage);
     TotalProjects = _projectRepository.TotalProjects();
     PagingInfo = new PagingInfo
                      {
                          CurrentPage = pageNo,
                          ItemsPerPage = itemsPerPage,
                          TotalItems = TotalProjects
                      };
 }