コード例 #1
0
ファイル: SqlRepository.cs プロジェクト: vsarrocchi/breakAway
        public SqlRepository(IBreakAwayContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            _context = context;

            _activities   = new DbSetTable <Activity>(_context.Activities);
            _contacts     = new DbSetTable <Contact>(_context.Contacts);
            _customers    = new DbSetTable <Customer>(_context.Customers);
            _destinations = new DbSetTable <Destination>(_context.Destinations);
            _events       = new DbSetTable <Event>(_context.Events);
            _equipments   = new DbSetTable <Equipment>(_context.Equipments);
            _payments     = new DbSetTable <Payment>(_context.Payments);
            _reservations = new DbSetTable <Reservation>(_context.Reservations);
            _lodgings     = new DbSetTable <Lodging>(_context.Lodgings);
        }
コード例 #2
0
 public TripRepository(IBreakAwayContext context)
 {
     _context = context;
 }
コード例 #3
0
 public SqlRepository(IBreakAwayContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }