public async Task <IActionResult> CloseNotification( CloseNotificationQuery query, CloseNotificationCommand command) { await _notificationService.HandleAsync(command); return(new EmptyResult()); }
public async Task <CommandExecutionResult> HandleAsync(CloseNotificationCommand command) { var changeEntry = new ChangeEntry <NotificationEntity>().Key(notification => notification.NotificationId, command.NotificationId) .Property(notification => notification.Closed, DateTime.UtcNow); await _repository.UpdateAsync(changeEntry.Entity, changeEntry.Properties); return(CommandExecutionResult.Success); }