Created
September 5, 2019 04:20
-
-
Save bruceharrison1984/00f1fddc6adff237d6d99eda9d863524 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 override void Configure(IFunctionsHostBuilder builder) | |
{ | |
... | |
builder.Services.AddLogging(); | |
//workaround azure functions not handling nested arrays by default | |
builder.Services.AddTransient<IConfigureOptions<MvcOptions>, MvcJsonMvcOptionsSetup>(); | |
builder.Services.AddTransient<BaseValidator<Widget>, WidgetValidator>(o => new WidgetValidator()); | |
builder.Services.AddTransient<BaseValidator<User>, UserValidator>(o => new UserValidator()); | |
builder.Services.AddTransient<FunctionWrapper<Widget>>(); | |
builder.Services.AddTransient<FunctionWrapper<User>>(); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment