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);
        }
示例#2
0
 public PickupsController(LorryMobileAPIContext context)
 {
     _context = context;
 }