public void TestSetup() { var train = new Train { TrainId = 1, TrainName = "Polar Express" }; var schedule = new Schedule { ScheduleId = 1, Train = train, ArrivalDate = DateTime.Now, DepartureDate = DateTime.Today, LeavesFrom = "Dallas", ArrivesAt = "New York" }; var reservation = new Reservation { ReservationId = 1, Passenger = "Phil Marlowe", Schedule = schedule }; _context = new FakeReservationContext(); var repository = new ReservationRepository(_context); repository.AddTrain(train); repository.AddSchedule(schedule); repository.AddReservation(reservation); repository.SaveChanges(); }
public ReservationRepository(IReservationContext context) { if (context == null) { throw new ArgumentNullException("context is null"); } _context = context; }
public ReservationRepo(IReservationContext context) { this._context = context; }
public ReservationsController(IReservationContext reservationContext, IHttpContextAccessor httpContextAccessor) { _reservationContext = reservationContext; _httpContextAccessor = httpContextAccessor; }
/// <summary>Initializes a new instance of the Ulacit.Mandiola.Biz.Concrete.ReservationService class.</summary> /// <param name="reservationContext">Context for the reservation.</param> public ReservationService(IReservationContext reservationContext) : base(reservationContext) { _reservationContext = reservationContext; }
public ReservationRepository(IReservationContext context) { _context = context; }
public ReservationLogic(IReservationContext context) { _context = context; }
public ReservationRepository(IReservationContext Context) { _Context = Context; }