Beispiel #1
0
 public ResultDto SaveSiteSettings(SiteSettingsDto siteSettingsDto)
 {
     return(Result(() =>
     {
         var siteSettings = ConvertTo(siteSettingsDto);
         SettingsProvider.SaveSettings(siteSettings);
     }));
 }
Beispiel #2
0
 private SiteSettings ConvertTo(SiteSettingsDto siteSettingsDto)
 {
     return(new SiteSettings
     {
         SiteId = siteSettingsDto.SiteId,
         AkismetApiKey = siteSettingsDto.AkismetApiKey,
         Introduction = siteSettingsDto.Introduction,
         MainLinks = siteSettingsDto.MainLinks,
         Footer = siteSettingsDto.MainLinks,
         DefaultPage = siteSettingsDto.PageTemplate,
         SearchAuthor = siteSettingsDto.SearchAuthor,
         SearchDescription = siteSettingsDto.SearchDescription,
         SearchKeywords = siteSettingsDto.SearchKeywords,
         SpamWords = siteSettingsDto.SpamWords,
         HtmlHead = siteSettingsDto.HtmlHead,
         HtmlFooter = siteSettingsDto.HtmlFooter,
         SiteTheme = siteSettingsDto.Theme,
         SmtpFromEmailAddress = siteSettingsDto.SmtpFromEmailAddress
     });
 }