public void ConfigureServices(IServiceCollection services) { services.AddSingleton <IMapper>(MapperManager.Create()) .AddScoped <DriveContext>() .AddScoped <ContextWriter>() .AddScoped <ContextReader>() .AddScoped <LinkReader>() .AddScoped <LinkWriter>(); services.AddSignalR(); services.AddCors() .AddCustomSwaggerGet() .AddMvc(option => option.EnableEndpointRouting = false) .SetCompatibilityVersion(CompatibilityVersion.Version_3_0); }