public ActionResult Create(BDSMarriage model)
 {
     if (!ModelState.IsValid)
     {
         return(View(model));
     }
     model.KeySearch = model.Name.NormalizeD() + " " +
                       (String.IsNullOrEmpty(model.Description)
                         ? ""
                         : model.Description.NormalizeD());
     _service.CreateItem(model);
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(BDSMarriage model)
 {
     if (!ModelState.IsValid)
     {
         ViewBag.Success = false;
         ViewBag.Message = Resource.SaveFailed;
         return(View(model));
     }
     model.KeySearch = model.Name.NormalizeD() + " " +
                       (String.IsNullOrEmpty(model.Description)
                           ? ""
                           : model.Description.NormalizeD());
     _service.UpdateItem(model);
     ViewBag.Success = true;
     ViewBag.Message = Resource.SaveSuccessful;
     return(Edit(model.ID));
 }
        public ActionResult Edit(int id)
        {
            BDSMarriage model = _service.GetItem(id);

            return(View(model));
        }