public FooOptions GetOptions3([FromServices] IConfiguration config) { //bind by hand when use in app code var theOptions = new FooOptions(); config.GetSection(FooOptions.SectionName).Bind(theOptions); return(theOptions); }
public FooOptions GetOptions4([FromServices] FooOptions options) { return(options); }