//public ClientRepositoryBase() : this(null) { }

        public ClientRepositoryBase(ISqlBaseFinanceData db) : base(db)
        {
            //System.Web.HttpContext.Current.Response.Write("-"+this.GetType().Name + "<br />");
            var keys = EntitySetKeys.GetAllEntitySetInfo();

            _entitySetName = keys[typeof(T)].SetName;
        }
示例#2
0
        //public RepositoryBase() :
        //    this(null)
        //{
        //}

        public RepositoryBase(ISqlBaseFinanceData db) : base(db)
        {
            //System.Web.HttpContext.Current.Response.Write("-"+this.GetType().Name + "<br />");
            //DB = db ?? ObjectFactory.GetInstance<ISqlClientFinanceData>();//如果没有定义,取默认数据库

            base.BaseDB = db;
            // ObjectFactory.GetInstance<ISqlClientFinanceData>();

            EntitySetKeysDictionary keys = EntitySetKeys.GetAllEntitySetInfo();

            _entitySetName = keys[typeof(T)].SetName;
        }
示例#3
0
        public void RunTest()
        {
            Console.WriteLine("XncfRegisterManager.RegisterList: " + XncfRegisterManager.RegisterList.Count);
            Assert.IsTrue(Senparc.Ncf.XncfBase.XncfRegisterManager.RegisterList.Count > 0);
            Console.WriteLine(XncfRegisterManager.RegisterList.Count);
            Assert.IsTrue(XncfRegisterManager.RegisterList.Count > 0);

            var allEntitySetInfo = EntitySetKeys.GetAllEntitySetInfo();

            Console.WriteLine(allEntitySetInfo.Count);
            Assert.IsTrue(allEntitySetInfo.Count > 0);

            Console.WriteLine(allEntitySetInfo.ToJson(true));
            Console.WriteLine("\r\n SenparcEntityTypes:");
            Console.WriteLine(allEntitySetInfo.First().Value.SenparcEntityTypes.Select(z => z.Name).ToJson(true));
        }