python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
get additional data on same collection in Mongodb C#
I have a collection called "User". I'm passing userid to get the record. In addition to that i also need additional 10 last updatedAt(DateTime) record excluding the userid record but added t...
CKK
Votes: 0
Answers: 1
Is there a way to use `ClassMap` to map one document property to multiple class properties?
Let's say I have a mongo document that looks like this:
{
"name": "John Doe"
}
Now let's say my model looks like this:
public class Person
{
public string FirstName { get;...
Rokit
Votes: 0
Answers: 2
How can I flatten this array of subdocuments?
This is the query I want to execute in my C# code:
db.Courses.aggregate([
{$unwind: "$topics"},
{$project: {"topics":1, _id:0}},
{$replaceRoot:{newRoot:"$topics"}}
...
ekke
Votes: 0
Answers: 1
.Net MongDB Driver more than 5x slower than pymongo equivalent
I have a collection with ~8.5k documents.
This Python code gets the last added document in ~50-70ms:
from pymongo import MongoClient
import pymongo, time
client = MongoClient(connectionString)
db = c...
Inhinias
Votes: 0
Answers: 0