public async Task <ActionResult> Index(CancellationToken cancellationToken) { var links = new List <LinkCol>() { new LinkCol() { Url = Url.Action("Edit", _baseModel.Name) + "/{id}", UrlTitle = "Edit", ColTitle = "Actions" } }; if (_baseModel.LinkRows != null) { links.AddRange(_baseModel.LinkRows); } int pageSize = 10; var filter = new FilterRequest(1, pageSize, "Id", "Asc", ""); var result = await _repository.AbstractAsync($"[{_baseModel.Name}].IsDeleted = 0", filter); int totalNumberOfRows = await _repository.CountAsync(cancellationToken); var model = new DataTableComponentModel() { Name = _baseModel.Name, Title = _baseModel.PluralName + " list", TableId = _baseModel.Name.ToLower() + "-table", FetchUrl = Url.Action("Index", _baseModel.Name), CreateUrl = Url.Action("Create", _baseModel.Name), LinkRows = links, Entity = _baseModel.Name, DataTable = (System.Data.DataTable)result.Model, PageCount = totalNumberOfRows / pageSize }; return(View("Base/_index", model)); }