Exemplo n.º 1
0
        public BookingsCalendarTests()
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();

            var options = new DbContextOptionsBuilder <CerberusContext>().UseSqlite(connection).Options;

            var context = new CerberusContext(options);

            context.Database.EnsureCreated();

            context.Customers.Add(new Customer {
                FirstName = "Adam", LastName = "Worley"
            });

            context.SaveChanges();

            _sut = new BookingsCalendar(new NullLogger <BookingsCalendar>(), context);
        }
 public CreateTodoItemCommandHandler(IBookingsCalendar context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public GetBookingQueryHandler(IBookingsCalendar context)
 {
     _context = context;
 }