コード例 #1
0
        public IActionResult Reset()
        {
            int?          index       = HttpContext.Session.GetInt32("userid");
            MonsterObject userMonster = dbContext.Monsters
                                        .Where(m => m.UserId == index)
                                        .FirstOrDefault();

            userMonster.reset();
            dbContext.SaveChanges();
            return(Redirect("/monster"));
        }