add dynamic value in startup file in .net core api
public void ConfigureServices(IServiceCollection services)
{
Action<MDUOptions> mduOptions = (opt =>
{
opt.CompanyCode = "aaaa";
});
services.Configure(mduOptions);
services.AddSingleton(resolver => resolver.GetRequiredService<IOptions<MDUOptions>>().Value);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}