public EmailTemplateListModel List(PagingCommand command) { IPagedList <EmailTemplate> emailTemplates = _emailTemplatesRepository.FetchPaged(q => q.OrderBy(t => t.TemplateName), command.PageIndex, command.PageSize); EmailTemplateListModel model = new EmailTemplateListModel { EmailTemplates = Mapper.Engine.MapPaged <EmailTemplate, EmailTemplateListModel.EmailTemplateSummary>( emailTemplates) }; return(model); }
public ActionResult Index(PagingCommand command) { TemplateList = _emailTemplatesService.List(command); return(View(TemplateList)); }