public IUnitOfWork GetUnitOfWork(DataBaseSelector dataBaseSelector) { //if (dataBaseSelector == DataBaseSelector.SqlServer) //{ // return new SqlServerUnitOfWork(_chinookSqlContext); //} //return new MySqlUnitOfWork(_chinookMySqlContext); return(_unitOfWorks.First(x => x.DataBaseSelector == dataBaseSelector)); }
public SqlServerUnitOfWork(ChinookSqlContext context) { DataBaseSelector = DataBaseSelector.SqlServer; Album = new Repository <Album>(context); }
public IUnitOfWork GetUnitOfWork(DataBaseSelector dataBaseSelector) { return(_unitOfWorks.First(x => x.DataBaseSelector == dataBaseSelector)); }
public MySqlUnitOfWork(ChinookMySqlContext context) { DataBaseSelector = DataBaseSelector.MySql; Album = new Repository <Album>(context); }