예제 #1
0
        public void UpdateSession(Accounts data)
        {
            DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext;

            context.SetSession(data.Id, data.Sessionid, data.Sessionip);
        }
예제 #2
0
        public ActionResult Select(string Login)
        {
            DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext;

            return(Json(context.GetAccount(Login)));
        }
예제 #3
0
        public ActionResult Login(string Login, string Password)
        {
            DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext;

            return(Json(context.Login(Login, Password)));
        }
예제 #4
0
        public IActionResult Index()
        {
            DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext;

            return(Json(context.GetAllAccounts()));
        }