예제 #1
0
        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);
        }
예제 #2
0
        /// <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)));
        }
예제 #3
0
        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);
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositoryAreaTests"/> class.
 /// </summary>
 public RepositoryAreaTests()
 {
     _configurationManager = new DataBaseConfigurationManager();
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositoryAreaTests"/> class.
 /// </summary>
 public RepositoryAreaTests()
 {
     _configurationManager = new DataBaseConfigurationManager();
     _context = new EfContext(_configurationManager.ConnectionString);
 }
예제 #6
0
 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)));
 }