public static async Task Main(string[] args) { _init(); var db = _serviceProvider.GetRequiredService <ApplicationDbContext>(); Sprint s = new Sprint(DateTime.UtcNow.Date, DateTime.UtcNow.AddDays(7).Date); db.Add(s); BacklogItem b = new BacklogItem("Comments feature"); db.Add(b); _log.LogDebug($"Calling CommitTo on BacklogItem: {b.Id} to Sprint: {s.Id}"); b.CommitTo(s); _log.LogDebug("Calling SaveChanges"); await db.SaveChangesAsync(); _log.LogDebug("SaveChanges Completed"); //Console.WriteLine("Press any key to exit..."); Console.ReadLine(); }