public async Task <Notification> CreateAsync(CreateNotificationRequest createNotificationRequest) { var notification = await base.CreateAsync(new Notification { UserId = createNotificationRequest.UserId, RequestId = createNotificationRequest.RequestId, Type = createNotificationRequest.Type, Severity = createNotificationRequest.Severity, MetaDeta1 = createNotificationRequest.MetaDeta1, MetaDeta2 = createNotificationRequest.MetaDeta2, MetaDeta3 = createNotificationRequest.MetaDeta3, Content = createNotificationRequest.Content?.ToJson(), }); if (createNotificationRequest.Users?.Count > 0) { var userNotifications = createNotificationRequest.Users.Select(x => new UserNotification { IsRead = false, NotificationId = notification.Id, UserId = x, }).ToList(); await _userNotificationService.BulkCreateAsync(userNotifications); } return(notification); }