public Handler() { var connectionString = Environment.GetEnvironmentVariable("CONNECTION_STRING"); var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseNpgsql(connectionString); _context = new DatabaseContext(optionsBuilder.Options); _googleClient = new GoogleClient(); _synonymGroupsGateway = new SynonymGroupsGateway(_context); _synonymWordsGateway = new SynonymWordsGateway(_context); _synonymsUseCase = new SynonymsUseCase(_synonymGroupsGateway, _synonymWordsGateway, _googleClient); }
public SynonymGroupsController(ISynonymsUseCase synonymsUseCase) { _synonymsUseCase = synonymsUseCase; }