// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var useInMemoryStore = !_Platform.IsRunningOnWindows || _Platform.IsRunningOnMono || _Platform.IsRunningOnNanoServer; services.ConfigureDataContext(Configuration, useInMemoryStore); // Register dependencies services.ConfigureDependencies(Configuration); services.AddCaching(); services.Configure <SecurityConfig>(Configuration.GetSection("Security")); // Add Identity services to the services container. services.AddIdentity <ApplicationUser, IdentityRole>() .AddEntityFrameworkStores <SkiResortContext>() .AddDefaultTokenProviders(); // Add framework services. services.AddMvc().AddJsonOptions(options => { options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); }); // Initialize anomaly detection statics AnomalyDetector.Initialize(Configuration); }