public void ConfigureServices(IServiceCollection services) { services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); var rssFeedsRepository = new RssFeedsRepository(Configuration["ConnectionString"]); var rssFeedManager = new RssFeedManager(rssFeedsRepository); services.AddSingleton(rssFeedManager); }
public RssFeedController(RssFeedManager rssFeedManager) { _rssFeedManager = rssFeedManager ?? throw new ArgumentNullException(nameof(rssFeedManager)); }