0

I am reading the cosmos db documentation here https://3c5.com/DQRpv

There are several examples which say something like this

input.Select(family => family.parents[0].familyName);

where the input is IQueryable of object.

My question is how do I get an IQueryable of object but ?

1 Answer 1

1

You can try something like below:

Container container = await this.database.CreateContainerIfNotExistsAsync(containerId, "<partitionkeypath>");
var input = this.container.GetItemLinqQueryable<Family>();
input.Select(family => family.parents[0].familyName);

Where Family is the class defined to map with container properties.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Anurag for taking a peek at this. Wish Microsoft makes this explicit in their documentations so people like me don't feel overwhelmed :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.