예제 #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);
        }
예제 #2
0
 public BookingsCalendar(ILogger <BookingsCalendar> logger, CerberusContext cerberusContext)
 {
     _logger          = logger;
     _cerberusContext = cerberusContext;
 }