public class TestDTO{ public Data data { get; set; }}public class Data{ public string fname { get; set; } public string lname { get; set; } public string phonenNumber { get; set; }}
fname
lname
TestDTO td = null;//code heretd = new TestDTO{ //how do I get to fname here?};
appsettings.json
NLog
public static void Main(string[] args){ IHost host = Host.CreateDefaultBuilder(args) .ConfigureServices(services => { services.AddHostedService<Worker>(); services.AddSingleton<ProcessingService>(); services.AddSingleton<Utilities>(); // services.AddSingleton<NLog>(); }) .Build(); host.Run();}