private async Task CreateNotification(Guid sendTo, Guid creator, MessageType type)
        {
            var userCreator = await userManager.FindByIdAsync(creator.ToString());

            await notificationRepository.CreateAsync(sendTo, creator, type, userCreator.Name);

            backgroundTask.EnqueueOneTimeJob <ISendNotificationTask>(x => x.Send(sendTo));
        }
Beispiel #2
0
        public async Task UpdateReadAsync(long id)
        {
            var notification = await notificationRepository.Get(id);

            await notificationRepository.UpdateAsync(notification, true);

            backgroundTask.EnqueueOneTimeJob <ISendNotificationTask>(x => x.Send(notification.SendTo));
        }