Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with AsString cast in BsonDocumentCollection #54

Open
object opened this issue Mar 19, 2012 · 0 comments
Open

Problem with AsString cast in BsonDocumentCollection #54

object opened this issue Mar 19, 2012 · 0 comments

Comments

@object
Copy link

object commented Mar 19, 2012

The following query works fine:

        var people = (from p in Collection.AsQueryable()
                      where p.FirstName.Contains("oe")
                      select p).ToList();

But this one always returns an empty result set:

        var people = (from p in BsonDocumentCollection.AsQueryable()
                      where p["fn"].AsString.Contains("oe")
                      select p).ToList();

It appears that if I cast a BsonValue using AsString, no results will be fetched.

It would be nice to have support for this, otherwise query on BsonDocumentCollection is quite limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant