public IActionResult Feed() { int? index = HttpContext.Session.GetInt32("userid"); MonsterObject userMonster = dbContext.Monsters .Where(m => m.UserId == index) .FirstOrDefault(); userMonster.Feed(); dbContext.SaveChanges(); return(Redirect("/monster")); }