logger: used only nlog logger provider.

This commit is contained in:
Alexey Bannov 2023-07-18 20:08:55 +03:00
parent 918f8a0618
commit 43c7b85a14

View File

@ -245,21 +245,21 @@ public class DbWorker
var dbWebhooks = await Queries.DbWebhooksAsync(webhooksDbContext).ToListAsync();
//foreach (var webhook in webhooks)
//{
// if (!dbWebhooks.Any(r => r.Route == webhook.Route && r.Method == webhook.Method))
// {
// try
// {
// // await webhooksDbContext.Webhooks.AddAsync(_mapper.Map<DbWebhook>(webhook));
// // await webhooksDbContext.SaveChangesAsync();
// }
// catch (Exception ex)
// {
foreach (var webhook in webhooks)
{
if (!dbWebhooks.Any(r => r.Route == webhook.Route && r.Method == webhook.Method))
{
try
{
await webhooksDbContext.Webhooks.AddAsync(_mapper.Map<DbWebhook>(webhook));
await webhooksDbContext.SaveChangesAsync();
}
catch (Exception ex)
{
// }
// }
//}
}
}
}
}
public async Task<List<Webhook>> GetWebhooksAsync()