Most voted "mongodb-csharp" questions
16 questions
Sort by count of
-
5
votes2
answers169
viewsExpand Object to Bson
How can I build a parse expander Object for Bson? (Vs 2013 - C# - Mongodb)
-
4
votes1
answer139
viewsConvert an XML file to BSON
I have a Complex Xml that contains "children" nodes and I need to convert it to BSON. I’m using VS 2013 (C#).
-
4
votes1
answer329
viewsHow to filter an array within a Collection in MONGODB - C#
I have the Collection PESSOA with a list of Languages as below: { "_id" : ObjectId("576be476ab76191bec2ff38c"), "Nome" : "Nome um", "Idiomas" : [ { "idioma" : "pt-BR", "descricao" : "Brasil" }, {…
-
4
votes1
answer331
viewsRight Way to Make Relationship One To Many Using C# and Mongodb
I have two entities, Sistema and Comentario where a system can have several comments: public class Sistema { public ObjectId Id { get; set; } [BsonElement("SistemaId")] public int SistemaId { get;…
-
3
votes1
answer167
viewsMVC# - Mongodb 2.0 dependency injection
I’m starting a project using MVC 4 with Driver 2.0 of MongoDB. I’m used to using Ninject with EF6 and would like to know if there is such a thing as MongoDBor some example architecture standard for…
c# pattern-design mongodb dependency-injection mongodb-csharpasked 8 years, 10 months ago Jhonathan 1,399 -
3
votes1
answer116
viewsMongodb Driver Fields Exclude
My problem is this, I have an object: public class Obj(){ prop int id {get; set;} prop Client client {get; set;} } public class Client(){ prop int id {get; set;} prop Group group {get; set;} }…
-
2
votes1
answer119
viewsError writing to Mongodb using C#Parallelism
I have a collection on Mongo that has subdocuments, so I read xml files and write them to Mongodb. Each xml file is a document in Mongo. My classes public class Cabecalho { public Cabecalho() {…
-
1
votes0
answers260
viewsCezar cipher in C# - (Error Unable to convert String to Char)
Cezar cipher in C# - (Error Unable to convert String to Char) Hello, I have a college exercise that Voce type a word and it plays the translation according to the displacement informed. If you type…
-
1
votes0
answers55
viewsAggregate in C# returns nothing?
I made a direct query on the console that returned me what I expected, the query in Mongo is like this. db.AtividadeResultMongo.aggregate([{$unwind: "$LsVariaveisProcesso"}, {$match: { IdAtividade :…
-
1
votes0
answers45
viewsMongoclient returns empty when selecting a Collection
I’m using the Mongodb Atlas with bank,and the Mongodbdriver to make the connection, but when selecting my Collection it returns empty instead of returning the collection data. My connection: class…
-
1
votes1
answer275
viewsFind(ID) of Mongo returns nothing
I have a collection called users on Mongo with approximately 1000 values. Access Mongo through Mongodb . NET Driver, at the moment everything works normally. But these past few days I’ve been…
-
0
votes2
answers243
viewsHow can I create a Datagridview with Mongodb?
I want to present the BD data in a table, but so far I could only do it using a ListView. How can I do it but using one DataGridView? using System; using System.Collections.Generic; using…
-
0
votes1
answer180
viewsDefining a property within a Bsondocument
Salve galera! I’m working with c# Mongodb . Net Driver, and there’s something I don’t understand in the queries, follow the example: var dataBase = mongoClient.GetDatabase(dbName); var…
-
0
votes0
answers235
viewsC# & Mongodb - How to filter in child document?
I am starting my adventures in Mongodb and I have a problem specifically with the filtering of documents. The model of my application: public class MatrizCurricular { [BsonId] public ObjectId _id {…
-
0
votes1
answer103
viewsDate filter problem in C# (Mongodb)
I’m trying to filter between dates in C# on a table in Mongodb. Expected results should be between 19/11/2020 and 20/11/2020. This is my code on C#: collection.Find<Admissao>(x =>…
-
-1
votes1
answer62
viewsString to Json data conversion for Collections in mongodb
When I query a Collection in mongodb, it returns a field of the string type. [{"id":"1325","nome":produto1,"estoque":"10"}] But I need to make this field a Json. It is possible to do this in the…