public bool UpdateMailTemplate(Guid id, EditMailTemplateModel model)
 {
     var currentTemplate = FindMailTemplate(id);
     if (currentTemplate == null)
         return false;
     model.MapTo(currentTemplate);
     repository.SaveChanges();
     return true;
 }
 public ActionResult Edit(Guid id, EditMailTemplateModel model)
 {
     if (ModelState.IsValid)
     {
         if (service.UpdateMailTemplate(id, model))
         {
             return RedirectToAction("Details", new { id });
         }
     }
     return View(model);
 }