As I’ve discovered… just calling .Dispose() on the IDisposable Iterator will not always work. The method that is calling bucket.Query(…) (which is wrapped in a using statement like @btburnett3 shows above ) is returning an Iterator (yield return) to the api controller level; that Iterator (rather than just calling .Dispose() on it) also needs to be wrapped in a using statement at the api controller level. I did finally get this to work.
Thanks for your help.
1 Like