Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
        public async Task <IActionResult> Seen(NotificationSeenCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }