public CustomerDashboardModel Dashboard(PagingCommand command, Guid customerId) { IPagedList <Project> projects = _projectRepository.FetchPaged(q => q.Where(p => p.CustomerId == customerId), command.PageIndex, command.PageSize); var model = new CustomerDashboardModel { Projects = Mapper.Engine.MapPaged <Project, CustomerDashboardModel.ProjectSummary>(projects) }; return(model); }
public ActionResult Index(PagingCommand command) { CustomerDashboardModel model = _customerDashboardService.Dashboard(command, Customer.CustomerId); return(View(model)); }