/// <summary>
 /// Initialize this class with the table to name to fetch ids from and the number of ids to be fetched
 /// </summary>
 /// <param name="tableName">the table to fetch ids from</param>
 /// <param name="estimatedRange">the total number of ids to be fetched</param>
 /// <param name="api">the api to fetch ids from</param>
 public SolutionIdGenerator(String tableName, int estimatedRange, IDbApi api)
 {
     this.tableName = tableName;
     range          = estimatedRange;
     dbapi          = api;
     initialId      = dbapi.fetchNewAvailableIds(tableName, estimatedRange);
     currentId      = initialId;
 }
Exemplo n.º 2
0
 public TestDbApi()
 {
     _testDb = new SqlDbApi(ConnStringTest);
     Init();
 }
Exemplo n.º 3
0
 public Person(IDbApi db)
 {
     _db = db;
 }