Example #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;
     }
 }
Example #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);
        }
Example #3
0
 internal InsertBuilder(DalLayerInfo dalInfo, string keyName, string identityName, TransacBuilder tranBuilder)
 {
     SetBuilderParams(dalInfo, keyName, identityName, tranBuilder);
 }
Example #4
0
 internal UpdateBuilder(DalLayerInfo dalInfo, string keyName, TransacBuilder tranBuilder)
 {
     SetBuilderParams(dalInfo, keyName, tranBuilder);
 }
Example #5
0
 internal Dao(TransacBuilder tranBuilder)
 {
     this.tranBuilder = tranBuilder;
 }