Example #1
0
        public virtual ActionResult GridDataSource(DataManager dm)
        {
            var query = _taxesService.GetAsQueryable();

            var dataSource = query.Select(p => new
            {
                p.Id,
                p.TaxName,
                p.Amount,
                p.IsActive
            });

            var result = dataSource.ApplyDataManager(dm, out var count).ToList();

            return(Json(dm.RequiresCounts ? new { result = result, count = count } : (object)result,
                        JsonRequestBehavior.AllowGet));
        }