コード例 #1
0
        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));
        }
コード例 #2
0
        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());
        }