Exemplo n.º 1
0
        // Post: Admin/Category/Add/id
        public virtual ActionResult Add(ServiceCategoryAdd model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            _serviceCategoryService.Add(model);
            _uow.SaveAllChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public void Add(ServiceCategoryAdd category)
 {
     _serviceCategories.Add(new ServiceCategory {
         Title = category.Title, Description = category.Description, Slug = category.Slug, Order = category.Order
     });
 }
Exemplo n.º 3
0
        // GET: Admin/Category/Add
        public virtual ActionResult Add()
        {
            ServiceCategoryAdd Category = new ServiceCategoryAdd();

            return(View(Category));
        }