public static async void GenerateStreamsId(IStreamsIdRepository streamsIdRepository, string clientId) { var streamsId = await streamsIdRepository.GetOrCreateAsync(clientId); if (streamsId == null) { var newEntity = new StreamsIdEntity { ClientId = clientId }; await streamsIdRepository.SaveAsync(newEntity); } }