コード例 #1
0
        public ClientRepositoryBase(ISqlBaseFinanceData db)
        {
            //System.Web.HttpContext.Current.Response.Write("-"+this.GetType().Name + "<br />");
            var keys = EntitySetKeys.GetEntitySetKeys(base.BaseDB.BaseDataContext.GetType());

            _entitySetName = keys[typeof(T)];
        }
コード例 #2
0
        public RepositoryBase(ISqlBaseFinanceData db) :
            base(db)
        {
            //System.Web.HttpContext.Current.Response.Write("-"+this.GetType().Name + "<br />");
            //DB = db ?? ObjectFactory.GetInstance<ISqlClientFinanceData>();//如果没有定义,取默认数据库

            base.BaseDB = db ?? SenparcDI.GetService <ISqlBaseFinanceData>();// ObjectFactory.GetInstance<ISqlClientFinanceData>();

            EntitySetKeysDictionary keys = EntitySetKeys.GetEntitySetKeys(base.BaseDB.BaseDataContext.GetType());

            _entitySetName = keys[typeof(T)];
        }