Programming Tips on 01-04-2020
- safely convert Unix TimeStamp to string :
DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture.NumberFormat)
- DI with parameters in constructor
services.AddScoped<SmsSentLogRepo>(s => new SmsSentLogRepo(Configuration.GetConnectionString("sms")));
- You should use ConfigureAwait(false) in your library code. source