public async Task <Unit> Handle(Command request, CancellationToken cancellationToken) { var sound = await context.Sounds.FirstOrDefaultAsync(sound => sound.Id == request.SoundId); if (sound.IsNull()) { throw new NotFoundException(request.SoundId, typeof(Sound)); } var sasToken = blobStorageService.GenerateSASTokenForContainer(sound.GuildId.ToString()); var messageObj = new { VoiceChannelId = request.VoiceChannelId, AudioUrl = sound.Url + "?" + sasToken }; var jsonSettings = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }; var message = JsonConvert.SerializeObject(messageObj, jsonSettings); await azureServiceBus.SendSoundboardMessage(message); return(Unit.Value); }