Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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);
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# skip debug attribute 
Csharp :: replace filename extension c# 
Csharp :: enumerate dictionary c# 
Csharp :: upload file add more size webconfig in asp.net mvc 
Csharp :: ExecuteResultAsync 
Csharp :: display array value sin C# 
Csharp :: class merging 
Csharp :: list to array f# 
Csharp :: edit opened excel file directly 
Csharp :: telerik raddatepicker default date today wpf 
Csharp :: unity soundclip mix 
Csharp :: ${1##*[! ]} 
Csharp :: unity phone vibration 
Csharp :: How to set a Printer Port in C# on a specified Printer 
Csharp :: c# short 
Csharp :: Unity mousetoterrainposition 
Csharp :: c# if loop 
Csharp :: c# monogame docs 
Csharp :: Known Folders C# 
Csharp :: unity check if object is being rendered 
Csharp :: shell32.dll c# example 
Csharp :: c# system.io check if file exists 
Csharp :: syncfusion worksheet get last row with value 
Csharp :: c# configurationmanager load from file 
Csharp :: using randomly chars to build a string 
Csharp :: converting alpha1 into int unity 
Csharp :: unity camera movement script 
Csharp :: initialize c# array property of class object site:stackoverflow.com 
Csharp :: how to split string into a list ignoring number of spaces c# 
Csharp :: c# servercertificatevalidationcallback 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =