コード例 #1
0
        public virtual ActionResult GridDataSource(DataManager dm, int filterByLangId)
        {
            var query = _localizationService.GetAsQueryable().Where(p => p.LanguageId == filterByLangId);

            var dataSource = query.Select(p => new
            {
                p.Id,
                p.ResourceName,
                p.ResourceValue,
                p.LanguageId,
            });

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

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