public DatabaseGateway(string dbType) { try { //get the database handler based on the type of database _iDBhelper = DBHelperFactory.GetDBHelper(dbType); } catch (Exception ex) { throw ex; } }
public static IDBhelper GetDBHelper(string type) { try { var Instance = Activator.CreateInstance(Type.GetType(type)); _iDBhelper = Instance as IDBhelper; } catch (Exception ex) { throw new Exception(string.Format("{0:1}", "Could not create instance of type", type), ex); } return(_iDBhelper); }
public EventRepository(IDBhelper _db) { db = _db; }
public ProductRepository(IDBhelper dBhelper) { _db = dBhelper; }
public PromotionRepository(IDBhelper dBhelper) { _db = dBhelper; }
public ShopRepository(IDBhelper _db) { db = _db; }
public BrandRepository(IDBhelper dBhelper) { _db = dBhelper; }