Exemplo n.º 1
0
        public void Setup()
        {
            var builder = new ConfigurationBuilder()
                          .AddEnvironmentVariables();

            _configuration = builder.Build();

            var options = new DbContextOptionsBuilder <LorryMobileAPIContext>()
                          .UseInMemoryDatabase(databaseName: "LorryLog")
                          .Options;

            _context    = new LorryMobileAPIContext(options);
            _controller = new PickupsController(_context);
        }
Exemplo n.º 2
0
 public PickupsController(LorryMobileAPIContext context)
 {
     _context = context;
 }