Пример #1
0
        // GET: /<controller>/
        public IActionResult Index()
        {
            TestDBContext context = HttpContext.RequestServices
                                    .GetService(typeof(blog.Models.TestDBContext)) as TestDBContext;

            //  = HttpContext.RequestServices.GetServ
            //  ice(typeof(MvcSakilaCore.Models.SakilaContext)) as SakilaContext;

            return(View(context.GetAllTexts()));
        }