Created
April 4, 2018 12:27
-
-
Save talkingdotnet/f795e1234b49a2115b15a6384ad0b0a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
// Use Entity Framework in-memory provider for this sample | |
services.AddDbContext<ToDoListContext>(options => options.UseInMemoryDatabase("ToDoList")); | |
services.AddMvc().AddJsonOptions(options => | |
{ | |
options.SerializerSettings.ContractResolver = new DefaultContractResolver(); | |
}); | |
services.AddResponseCompression(options => | |
{ | |
options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] | |
{ | |
MediaTypeNames.Application.Octet, | |
WasmMediaTypeNames.Application.Wasm, | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment