public void TestInitialize()
        {
            _db = new BookingContext(_testDBConnectionString);

            //SQL Compact needs to have an open connection before we can start transaction. (Had to stackOverflow this one)
            ((IObjectContextAdapter)_db).ObjectContext.Connection.Open();

            //Transaction to clean up between each test.
            _transaction = new TransactionScope();
        }
Exemple #2
0
 public override void EnterState(BookingContext bookingContext)
 {
     bookingContext.ShowState("Booked");
     bookingContext.View.ShowStatusPage("Enjoy the event");
 }
Exemple #3
0
 public override void DatePassed(BookingContext bookingContext)
 {
     bookingContext.TransitionToState(new ClosedState("We hope you Enjoyed the event"));
 }
Exemple #4
0
 public UserService(BookingContext dbContext)
 {
     _dbContext = dbContext;
 }
 public BookingsController(BookingContext context)
 {
     _context = context;
 }
Exemple #6
0
 public override void Cancel(BookingContext booking)
 {
     booking.View.ShowError("Cannot cancel closed booking!", "Closed Booking Error");
 }
Exemple #7
0
 public override void EnterDetails(BookingContext booking, string attendee, int ticketCount)
 {
     booking.View.ShowError("Invalid action for this case", "Closed Booking Error");
 }
Exemple #8
0
 public HomeController(BookingContext context)
 {
     _context = context;
 }
Exemple #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="context"></param>
 public Repository(BookingContext context)
 {
     _dbSet = context.Set <TEntity>();
 }
Exemple #10
0
 public PerformancesController(BookingContext context)
 {
     _context = context;
 }
Exemple #11
0
 public TipoQuartoesController(BookingContext context)
 {
     _context = context;
 }
 public DomainEventsDispatcher(BookingContext ctx, IMediator mediator, IAssemblyProvider assemblyProvider)
 {
     this.ctx              = ctx;
     this.mediator         = mediator;
     this.assemblyProvider = assemblyProvider;
 }
Exemple #13
0
 public BookingRepository(BookingContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
Exemple #14
0
        public AuthorizeController(ILogger <AuthorizeController> logger, BookingContext bookingContext)
        {
            this.Logger = logger;

            this.BookingContext = bookingContext;
        }
 public EspecificacoesQuartoesController(BookingContext context)
 {
     _context = context;
 }
 public BookingModelsController(BookingContext context, ILogger <BookingModelsController> logger)
 {
     _context    = context;
     this.logger = logger;
 }
 private void btnCreate_Click(object sender, RoutedEventArgs e)
 {
     booking = new BookingContext(this);
 }
 public ReservationRepository(BookingContext bookingContext)
 {
     _bookingContext = bookingContext;
 }
Exemple #19
0
 public override void DatePassed(BookingContext booking)
 {
     booking.View.ShowError("Invalid action for this case", "Closed Booking Error");
 }
Exemple #20
0
 public UserProvider(BookingContext context)
 {
     _context = context;
 }
Exemple #21
0
 public override void EnterState(BookingContext booking)
 {
     booking.ShowState("Closed");
     booking.View.ShowStatusPage(_reasonClosed);
 }
Exemple #22
0
 public abstract void EnterState(BookingContext booking);
Exemple #23
0
 public CategoryModelsController(BookingContext context, ILogger <CategoryModelsController> logger)
 {
     _context    = context;
     this.logger = logger;
 }
Exemple #24
0
 public abstract void Cancel(BookingContext booking);
Exemple #25
0
 public override void EnterDetails(BookingContext bookingContext, string atendee, int ticketCount)
 {
     throw new System.NotImplementedException();
 }
Exemple #26
0
 public abstract void DatePassed(BookingContext booking);
Exemple #27
0
 public override void Cancel(BookingContext bookingContext)
 {
     bookingContext.TransitionToState(new ClosedState("Booking canceled:  Expect a refund"));
 }
Exemple #28
0
 public abstract void EnterDetails(BookingContext booking, string attendee, int ticketCount);
 public ServicosHotelsController(BookingContext context)
 {
     _context = context;
 }
Exemple #30
0
 public GenericRepository(BookingContext context)
 {
     _context = context;
 }
 public void DropCreateDatabaseIfModelChanges()
 {
     var dbContext = new BookingContext();
     var listOfPanels = dbContext.TblCustomerBookings.ToList();
 }
 public AirportRepo(BookingContext context)
 {
     _context = context;
 }