예제 #1
0
        public static EmailTemplate ToEntity(this EmailTemplateViewModel model, ProviderPortalEntities db)
        {
            var emailTemplate = model.EmailTemplateId == 0 ? new EmailTemplate() : db.EmailTemplates.Find(model.EmailTemplateId);

            emailTemplate.Name        = model.Name;
            emailTemplate.Description = model.Description;
            emailTemplate.Subject     = model.Subject;
            emailTemplate.HtmlBody    = model.HtmlBody;
            emailTemplate.Priority    = model.Priority;
            emailTemplate.Params      = model.Params;
            return(emailTemplate);
        }
예제 #2
0
 public static EmailTemplateViewModel Populate(this EmailTemplateViewModel model, ProviderPortalEntities db)
 {
     return(model);
 }