// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { DtoMapping.H5Configure(); // Add framework services. services.AddMvc().AddJsonOptions(op => op.SerializerSettings.ContractResolver = new DefaultContractResolver()); // Register the IConfiguration instance which MyOptions binds against. services.Configure <MyOptions>(Configuration.GetSection("MyOptions")); services.AddDirectoryBrowser(); }