public GroupCampaignAccountCaptionViewModel(IEnumerable <CampaignAccountCaption> campaignAccountCaptions) { var query = campaignAccountCaptions.OrderByDescending(m => m.DateModified); var lastcamption = query.FirstOrDefault(); if (lastcamption != null) { LastCaption = new CampaignAccountCaptionViewModel(lastcamption); } Captions = CampaignAccountCaptionViewModel.GetList(query); }
public ListCampaignAccountCaptionViewModel(IEnumerable <CampaignAccountCaption> campaignAccountCaptions, int page, int pagesize, int total) { CampaignAccountCaptions = CampaignAccountCaptionViewModel.GetList(campaignAccountCaptions); Pager = new PagerViewModel(page, pagesize, total); }