public async Task AddLogItems(IEnumerable <LogItem> li)
        {
            using (LoggingDbContext context = new LoggingDbContext(this.options))
            {
                foreach (var logItem in li)
                {
                    var application = context.Application.FirstOrDefault(app => app.Name == logItem.Application);

                    if (application == null)
                    {
                        context.Add(application = new Application {
                            Name = logItem.Application
                        });
                        await context.SaveChangesAsync();
                    }

                    await context.AddAsync(new LogMessage { ApplicationId = application.Id, Log_level = logItem.LogLevel, Date = logItem.Date, Message = logItem.Message });
                }

                await context.SaveChangesAsync();
            }
        }
 public static Task SeedAsync(LoggingDbContext loggingDbContext,
                              ILoggerFactory loggerFactory, int?retry = 0)
 {
     return(Task.CompletedTask);
 }