Beispiel #1
0
        public void UpdateCategory()
        {
            CategroyViewModel categroy = new CategroyViewModel {
                Id = 5, Name = "clothes"
            };
            var result = categroyAppService.UpdateCategroy(categroy);

            Assert.That(result, Is.True);
        }
        public ActionResult Edit(CategroyViewModel categroy)
        {
            if (!ModelState.IsValid)
            {
                return(View(categroy));
            }

            categroyAppService.UpdateCategroy(categroy);
            return(RedirectToAction("Index"));
        }