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