카테고리moodle

mongodb c# max & setfields

var max = collection.FindAll().SetSortOrder(SortBy.Descending(“seqno”)).SetLimit(1).SetFields(Fields.Include(“seqno”).Exclude(“_id”)); mongo.seqno = 1; foreach (BsonDocument item in max) { mongo.seqno = item.GetValue(“seqno”).ToInt32() + 1; } MongoDB.Driver.WriteConcernResult items = collection.Insert(mongo);

더보기

This is a unique website which will require a more modern browser to work!

Please upgrade today!