public async Task <Unit> Handle(RemoveCalendarEventCommand command, CancellationToken cancellationToken) { var calendarEvent = await _calendarEventRepository.FindOne(command.Id); if (calendarEvent == null) { throw new ResourceNotFoundException(); } await _calendarEventRepository.Remove(calendarEvent); return(Unit.Value); }