示例#1
0
 public Task MarkMessageRead(Guid id)
 {
     return(taskQueue.QueueTask(() =>
     {
         var message = dbContext.Messages.FindAsync(id).Result;
         if (message?.IsUnread != true)
         {
             return;
         }
         message.IsUnread = false;
         dbContext.SaveChanges();
         notificationsHub.OnMessagesChanged().Wait();
     }, true));
 }