public static GuidsDBContext GetDBContext(string dbName) { var options = new DbContextOptionsBuilder <GuidsDBContext>() .UseInMemoryDatabase(databaseName: dbName) .Options; var dbContext = new GuidsDBContext(options); return(dbContext); }
public GuidController(GuidsDBContext context, ICaching cache) { _context = context; _cache = cache; _manager = new GuidManager(_context, _cache); }
public GuidManager(GuidsDBContext context, ICaching cache) { _context = context; _cache = cache; }
public UnitTests() { _caching = new CacheMock(); _dbContext = DbContextMock.GetDBContext("Cylance"); _guidController = new GuidController(_dbContext, _caching); }