예제 #1
0
        public IActionResult Create(Category model)
        {
            if (ModelState.IsValid)
            {
                //TODO: set message
                var categories = new List <Category>();
                categories.Add(model);
                _inventoryService.AddCategories(categories);
                return(RedirectToAction("Index"));
            }

            //TODO: set message
            return(View(model));
        }