Фикс получения INotificationRepository через ServiceProvider

This commit is contained in:
parent 343a6703e7
commit 4226d6366c

View File

@ -105,9 +105,9 @@ namespace AsbCloudInfrastructure.Services.Email
notification.SentDate = DateTime.UtcNow;
var notificationRepository = serviceProvider.GetService<INotificationRepository>();
var notificationRepository = serviceProvider.GetRequiredService<INotificationRepository>();
await notificationRepository!.UpdateAsync(notification, token);
await notificationRepository.UpdateAsync(notification, token);
Trace.TraceInformation($"Send email to {notification.User.Email} subj:{notification.Title} html body count {notification.Message.Length}");
};