首页 新闻 赞助 找找看

Kooboo CMS 现在想从XML存储数据模式改为SQL SERVER

0
悬赏园豆:10 [已解决问题] 解决于 2015-04-08 17:05

@阿不

这个CMS好像是你做的,请教一下,在这个CMS中,我现在想要把默认存储数据格式改为SQL SERVER模式,你的SQL SERVER Provider我也在codeplex上面下载了,

但是有一个问题,我连的SQL SERVER是一个空数据库啊,现在一新建页面就报错,说Repository为NULL。请问一下有没有示例数据库,就是那种基本的。

  每次都是到这里报错。

#region License
// 
// Copyright (c) 2013, Kooboo team
// 
// Licensed under the BSD License
// See the file LICENSE.txt for details.
// 
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kooboo.CMS.Content.Models;
using System.Runtime.Caching;
using Kooboo.CMS.Caching;

namespace Kooboo.CMS.Content.Caching
{
    public static class CacheExtensions
    {
        public static ObjectCache ObjectCache(this Repository repository)
        {
            return CacheManagerFactory.DefaultCacheManager.GetObjectCache(repository.GetKey());
        }
        private static string GetKey(this Repository repository)
        {
            return "Repository:CacheObject:" + repository.Name;
        }
        public static void ClearCache(this Repository repository)
        {
            CacheManagerFactory.ClearWithNotify(repository.GetKey());
        }
    }
}

分数不多。http://www.cnblogs.com/hjf1223/ 这是阿不的博客。

问题补充:

问题已经解决了,这个CMS是可以自动建表的,唯一的错的地方就是数据库没建立起来。第一步的时候。

KMSFan的主页 KMSFan | 初学一级 | 园豆:108
提问于:2015-04-06 23:25
< >
分享
最佳答案
1

http://www.cnblogs.com/hjf1223/archive/2009/12/26/ef_cross_db_sqlite_asp_net_provider.html

收获园豆:10
问天何必 | 老鸟四级 |园豆:3311 | 2015-04-07 09:05
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册