public void UpdateSession(Accounts data) { DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext; context.SetSession(data.Id, data.Sessionid, data.Sessionip); }
public ActionResult Select(string Login) { DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext; return(Json(context.GetAccount(Login))); }
public ActionResult Login(string Login, string Password) { DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext; return(Json(context.Login(Login, Password))); }
public IActionResult Index() { DiamondStoriesContext context = HttpContext.RequestServices.GetService(typeof(DiamondStoriesContext)) as DiamondStoriesContext; return(Json(context.GetAllAccounts())); }