示例#1
0
 private void SetBuilderParams(DalLayerInfo dalInfo, string keyName, TransacBuilder tranBuilder)
 {
     this.dalInfo = dalInfo;
     this.keyName = keyName;
     if (tranBuilder != null)
     {
         this.tranBuilder            = tranBuilder;
         this.tranBuilder.BeforeRun += this.CreateSqlCommand;
     }
 }
示例#2
0
        public ITransacBuilder TransacBuilder()
        {
            if (Thread.CurrentThread.ManagedThreadId != this.initThreadId)
            {
                return(new TransacBuilder(dalInfo, dicKeyNames, dicIdentityNames));
            }
            string key   = "ITransacBuilder";
            object value = null;

            if (!dicBuilder.TryGetValue(key, out value))
            {
                value = new TransacBuilder(dalInfo, dicKeyNames, dicIdentityNames);
                dicBuilder.Add(key, value);
            }
            return((TransacBuilder)value);
        }
示例#3
0
 internal InsertBuilder(DalLayerInfo dalInfo, string keyName, string identityName, TransacBuilder tranBuilder)
 {
     SetBuilderParams(dalInfo, keyName, identityName, tranBuilder);
 }
示例#4
0
 internal UpdateBuilder(DalLayerInfo dalInfo, string keyName, TransacBuilder tranBuilder)
 {
     SetBuilderParams(dalInfo, keyName, tranBuilder);
 }
示例#5
0
 internal Dao(TransacBuilder tranBuilder)
 {
     this.tranBuilder = tranBuilder;
 }