// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddMvc(); // Register the Swagger generator services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "Vehicles REST APIs", Version = "v1" }); }); // register the `Data:DefaultConnection` configuration section as // a configuration for the `DatabaseOptions` type services.Configure <DatabaseOptions>(Configuration.GetSection("DatabaseConnection")); services.Configure <PagingOptions>(Configuration.GetSection("DefaultPagingOptions")); DependencyInjector.ConfigureServices(services); }