private Util(DbEngine db) { _db = db; }
protected LHDBAccess(string constr) { PreconditionAssert.IsNotNullOrEmpty(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); _engine = new DbEngine(Factory, constr); }
public static void DoAction(DbEngine db, Action<Util> action) { Util item = null; if (_map == null) { _map = new Dictionary<DbEngine, Util>(); item = new Util(db); _map[db] = item; } else if (!_map.TryGetValue(db, out item)) { item = new Util(db); _map[db] = item; } item.DoAction(action); }