示例#1
0
        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);
        }
示例#2
0
 public RssFeedController(RssFeedManager rssFeedManager)
 {
     _rssFeedManager = rssFeedManager ?? throw new ArgumentNullException(nameof(rssFeedManager));
 }