I'm new in mongo. I'm wrting code in C# that get information from MongoDB. I need to get records that fit some terms, but I only know how to write queries that fit one term. For example, this code:
var connectionString = ConfigurationManager.AppSettings["MongoAddress"];
var client = new MongoClient(connectionString);
var server = client.GetServer();
var database = server.GetDatabase("Gnip");
var collection = database.GetCollection<DOC>("GnipUL");
var query2 = Query<DOC>.EQ(e1 => e1.Type, iType);
var search = collection.Find(query2);`
Gets records where the field 'Type' is equal to iType
. How do I change this code to find records there the field 'Type' is equal to iType
, and the field 'Taken' is equel to 1.