Exemple #1
0
        //Providing data fof a main table in a json format
        public JsonResult Table(dtParam param)
        {
            dtCustomerEnt res = new dtCustomerEnt();

            res.data            = res.GetData(param, db.CustomerEnts.AsNoTracking());
            res.draw            = param.Draw;
            res.recordsTotal    = db.CustomerEnts.AsNoTracking().Count();
            res.recordsFiltered = res.Count(param, db.CustomerEnts.AsNoTracking());
            return(Json(res));
        }
Exemple #2
0
        public JsonResult CMogilev(dtParam param)
        {
            IQueryable <CustomerEnt> query = db.CustomerEnts.AsNoTracking().Where(c => c.Address.Contains("могил"));
            dtCustomerEnt            res   = new dtCustomerEnt();

            res.data            = res.GetData(param, query);
            res.draw            = param.Draw;
            res.recordsTotal    = db.CustomerEnts.AsNoTracking().Count();
            res.recordsFiltered = res.Count(param, query);
            return(Json(res));
        }