// Post: Admin/EmailTemplateC/Add/id public virtual ActionResult Add(EmailTemplateAdd model) { if (!ModelState.IsValid) { return(View(model)); } _emailTemplateService.Add(model); _uow.SaveAllChanges(); return(RedirectToAction("Index")); }
public void Add(EmailTemplateAdd emailTemplate) { _emailTemplate.Add(new EmailTemplate { Title = emailTemplate.Title, Description = emailTemplate.Description, Body = emailTemplate.Body }); }
// GET: Admin/EmailTemplateC/Add public virtual ActionResult Add() { EmailTemplateAdd emailTemplateAdd = new EmailTemplateAdd(); return(View(emailTemplateAdd)); }