public ActionResult Create(CategoriesPost categoriesPost)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _categoryPostService.Add(categoriesPost);
             TempData["Messeage"] = ValidateMesseage.AddSuccessful;
             return RedirectToAction("Index");
         }
         return View(categoriesPost);
     }
     catch (WebException ex)
     {
         TempData["Messeage"] = ex.Message;
         return RedirectToAction("Index");
     }
 }
Beispiel #2
0
 public void Update(CategoriesPost entity)
 {
     _categoryPostRepository.Update(entity);
 }
Beispiel #3
0
 public void Add(CategoriesPost entity)
 {
     _categoryPostRepository.Insert(entity);
 }