thank you Craig i found how to do it with javascript commands(strings) in c# code :((( its a bit ugly
var query = Query.And(
Query.GTE("InsertDate", DateTime.Today.AddDays(-14)),
Query.LT("InsertDate", DateTime.Today),
Query.EQ("ItemValue", 102)
);
var map = @"function() {
var key = { id: this.PositionId,
year : this.InsertDate.getYear(),
month : this.InsertDate.getMonth(),
day : this.InsertDate.getDate()}
emit(key, { count : 1 });}";
var reduce = @"function(key, emits) {
total = 0;
for (var i in emits) {
total += emits[i].count;
}
return { count : total };}";
var result = collection.MapReduce(query, map, reduce);
var mr = result.GetResults().ToList();
the question is - is it any possibility to write it in Linq just to prevent a string code ?
.