示例#1
0
        private Task UpdateNotification(UpdateNotification request)
        {
            var notification = _notificationsRepo.GetNotification(request.Id, request.UserId);

            notification.Description = request.Description;
            notification.Level       = request.Level;
            notification.Url         = request.Url;

            notification.Date = DateTime.UtcNow;

            notification.RelatedId = request.RelatedId;
            notification.Category  = request.Category;

            notification.Name = request.Name;

            return(_notificationsRepo.UpdateNotification(notification, CancellationToken.None));
        }
示例#2
0
        public void Post(UpdateNotification request)
        {
            var task = UpdateNotification(request);

            Task.WaitAll(task);
        }