public JsonResult Index() { List <ChildGroup> groups = new List <ChildGroup>(); using (ctx.Start()) { groups = cgDataService.Search <ChildGroup>(x => x.Key >= 1).ToList(); } return(Json(groups, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { List <ChildGroup> groups = new List <ChildGroup>(); using (ctx.Start()) { groups = cgDataService.Search <ChildGroup>(x => x.Key >= 1).ToList(); } ViewBag.Message = "Welcome to ASP.NET MVC!" + groups.Count; //SessionManager return(View()); }