public SqlServiceTests() { _configurationManager = new DataBaseConfigurationManager(); _seatService = new Service <Seat, SeatDto>(_seatRepository); _areaService = new Service <Area, AreaDto>(_areaRepository); _layoutService = new Service <Layout, LayoutDto>(_layoutRepository); _venueService = new Service <Venue, VenueDto>(_venueRepository); _eventService = new Service <Event, EventDto>(_eventRepository); }
/// <summary> /// Get special Instance of IDataProvider /// </summary> /// <param name="dbConfigurationName"></param> /// <returns></returns> public static IDataProvider GetInstance(string dbConfigurationName) { IDataProvider dataProvider = null; if (dataProviders.TryGetValue(dbConfigurationName, out dataProvider)) { return(dataProvider); } return(GetInstance(DataBaseConfigurationManager.GetConfiguration(dbConfigurationName))); }
public EfServiceTests() { _configurationManager = new DataBaseConfigurationManager(); _context = new EfContext(_configurationManager.ConnectionString); _venueRepository = new EfRepository <Venue>(_context); _layoutRepository = new EfRepository <Layout>(_context); _areaRepository = new EfRepository <Area>(_context); _seatRepository = new EfRepository <Seat>(_context); _eventRepository = new EfRepository <Event>(_context); _eventAreaRepository = new EfRepository <EventArea>(_context); _eventSeatRepository = new EfRepository <EventSeat>(_context); _seatService = new Service <Seat, SeatDto>(_seatRepository); _areaService = new Service <Area, AreaDto>(_areaRepository); _layoutService = new Service <Layout, LayoutDto>(_layoutRepository); _venueService = new Service <Venue, VenueDto>(_venueRepository); _eventService = new Service <Event, EventDto>(_eventRepository); _eventAreaService = new Service <EventArea, EventAreaDto>(_eventAreaRepository); _eventSeatService = new Service <EventSeat, EventSeatDto>(_eventSeatRepository); }
/// <summary> /// Initializes a new instance of the <see cref="RepositoryAreaTests"/> class. /// </summary> public RepositoryAreaTests() { _configurationManager = new DataBaseConfigurationManager(); }
/// <summary> /// Initializes a new instance of the <see cref="RepositoryAreaTests"/> class. /// </summary> public RepositoryAreaTests() { _configurationManager = new DataBaseConfigurationManager(); _context = new EfContext(_configurationManager.ConnectionString); }
public void TestGetConfiguration() { Assert.IsNotNull(DataBaseConfigurationManager.GetConfiguration("sqlConn")); }
/// <summary> /// Get special Instance of IDataBaseObjectBuilder /// </summary> /// <param name="dbConfigName"></param> /// <returns></returns> internal static IDataBaseObjectBuilder GetDataBaseObjectBuilder(string dbConfigurationName) { return(GetDataBaseObjectBuilder(DataBaseConfigurationManager.GetConfiguration(dbConfigurationName))); }