Alex Rivera | Logout

Query projection with MongoDB 10gen driver

Asked 2011-08-21T20:50:27.550
12

Recently i was playing with mongodb official driver. The problem that i've encountered was how to make query projection. Example if i have a persisted object

class A{
  id
  PropA
  PropB
  List<LargeObjects>
}

How can i only retrieve id, PropA and PropB instead of retrieving the whole object ? How can be done with the mongodb official c# driver ?

Edit
Report

1 Answer

0

Take a look at FluentMongo:

https://github.com/craiggwilson/fluent-mongo/wiki/Linq

It is available on Nuget aswell, search for "fluentmongo"

answered 2011-08-21T21:33:18.753

Your Answer