コード例 #1
0
        public async Task <IActionResult> Create(Category request)
        {
            if (!HttpContext.Session.GetInt32("authenticated").HasValue)
            {
                return(new RedirectToActionResult("index", "login", null));
            }

            var category = await categoryModel.CreateCategory(request);

            return(new RedirectToActionResult("index", "category", null));
        }