public SynonymsUseCase(ISynonymGroupsGateway synonymGroupsGateway, ISynonymWordsGateway synonymWordsGateway, IGoogleClient googleClient) { _synonymGroupsGateway = synonymGroupsGateway; _synonymWordsGateway = synonymWordsGateway; _googleClient = googleClient; }
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); }