コード例 #1
0
 public void SetContent(PageContent content)
 {
     if (content.Id != 0)
     {
         _repository.GetConnection(
             c =>
             c.Execute("UPDATE Contents SET Content = @content, Language = @lang, PageType = @pagetype WHERE Id = @id",
                       new {content = content.Content, lang = content.Language, pagetype = content.PageType, id = content.Id}));
     }
     else
     {
         _repository.GetConnection(c => c.Execute("INSERT INTO Contents VALUES (NULL, @content, @lang, @pagetype)", new { content = content.Content, lang = content.Language, pagetype = content.PageType }));
     }
 }
コード例 #2
0
        public JsonResult SetContent(PageContent pageContent)
        {
            ContentService.SetContent(pageContent);

            return new JsonResult();
        }
コード例 #3
0
 public void SetContent(PageContent content)
 {
     _languageRepository.SetContent(content);
 }