Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active Mar 23, 2016
Embed
What would you like to do?
ASP.NET Core Tips & Tricks
public IServiceProvider ConfigureServices(IServiceCollection services)
{
...
this.ConfigureMvc(services, this.LoggerFactory);
...
}
private void ConfigureMvc(IServiceCollection services, ILoggerFactory logger)
{
var builder = services.AddMvc();
...
// Setup global exception filters
builder.AddMvcOptions(o => { o.Filters.Add(new GlobalExceptionFilter(logger)); });
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment