示例#1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            MvcInstaller mvcInstaller = new MvcInstaller();

            mvcInstaller.InstallServices(services, Configuration);

            DbInstaller dbInstaller = new DbInstaller();

            dbInstaller.InstallServices(services, Configuration);
        }
示例#2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var db = new DbInstaller();

            db.InstallServices(services, Configuration);
            var mvc = new MvcInstaller();

            mvc.InstallServices(services, Configuration);
            services.AddAutoMapper(typeof(Startup));
            var swagger = new SwaggerInstaller();

            swagger.InstallServices(services, Configuration);
            var cache = new CacheInstaller();

            cache.InstallServices(services, Configuration);
        }