예제 #1
0
 /// <summary>
 /// ブログの設定を取得します
 /// </summary>
 /// <param name="dbConnectionString">接続文字列</param>
 /// <returns></returns>
 public static List<BlogConfig> GetConfigs(string dbConnectionString)
 {
     List<BlogConfig> configs = new List<BlogConfig> { };
     using (HNKBlogConfigResource resource = new HNKBlogConfigResource(dbConnectionString))
     {
         configs = resource.GetBlogConfigs();
     }
     return configs;
 }
예제 #2
0
        /// <summary>
        /// 記事を更新します
        /// </summary>
        /// <param name="dbConnectionString">接続文字列</param>
        /// <param name="configs">更新後のカテゴリ</param>
        /// <returns>成功した場合に真を返す</returns>
        public static bool UpdateConfigs(string dbConnectionString, List<BlogConfig> configs)
        {
            if (configs == null || configs.Count < 1)
            {
                return false;
            }

            bool result = false;
            using (HNKBlogConfigResource resource = new HNKBlogConfigResource(dbConnectionString))
            {
                result = resource.UpdateBlogConfigs(configs);
            }

            return result;
        }