Ejemplo n.º 1
0
        public IActionResult Create(CostumeModel model)
        {
            Costume costume = new Costume();

            costume.costume = model.CostumeName;
            _CostumeRepo.Insert(costume);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public IActionResult Index(CostumeModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            _costumeRepo.Insert(model.CostumeName);

            return(RedirectToAction("Index"));
        }