public async Task<ActionResult> IndexDiff() { var tableOrder = _productsDb.Where(p => !p.Value.IsPublished).OrderBy(p => p.Value.Title).Select(p => new ServicePublicData() { Id = p.Value.Id.ToString() }).ToList(); var tableOrderVM = new TableOrderViewModel(UIKeysProductDrafts.Index.ProductTableOrder, tableOrder); var titleVM = new TableViewModel(UIKeysProductDrafts.IndexDiff.ProductTitleColumn, page => page.Html.Action("IndexDiff")); var authorVM = new TableViewModel(UIKeysProductDrafts.IndexDiff.ProductAuthorColumn, page => MvcHtmlString.Empty); return ViewModels(tableOrderVM, titleVM, authorVM); }
public async Task<ActionResult> Index() { var tableOrder = _productsDb.Where(p => !p.Value.IsPublished).OrderBy(p => p.Value.Title).Select(p => new ServicePublicData() { Id = p.Value.Id.ToString() }).ToList(); var model = new TableOrderViewModel(UIKeysProductDrafts.Index.ProductTableOrder, tableOrder); return ViewModel(model); }