Example #1
0
 public async Task HandleAsync(NotificationSeenCommand command)
 {
     command.NotificationIds.ForEach(x =>
     {
         _context.NotificationUserSeen
         .FirstOrDefault(t => t.UserId == command.UserId && t.NotificationId == x)
         .Seen = true;
     });
     await _context.SaveChangesAsync();
 }
Example #2
0
        public async Task <IActionResult> Seen(NotificationSeenCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }