よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public IActionResult Index() { if (GetId(HttpContext) == null) { return(RedirectToAction("Index", "LoginReg")); } ViewData["Message"] = "Welcome!"; ViewBag.User = _userFactory.GetUserByID((int)GetId(HttpContext)); ViewBag.Activities = _activityFactory.GetAllActivities(); return(View("Index")); }