Questions tagged [fluent-mongo]

fluent-mongo aims to provide a Fluent Interface on top of the Official MongoDB C# driver from 10gen. Fluent Interfaces are an attempt to improve the readability of interfaces (strongly typed, method chaining etc.)

The phrase "Fluent Interface" was first coined by Eric Evans and Martin Fowler. You can see the original Fluent Interface definition by Martin Fowler here:

http://www.martinfowler.com/bliki/FluentInterface.html

The fluent-mongo implementation can be found on github here:

https://github.com/craiggwilson/fluent-mongo

9 questions
3
votes
1 answer

Using FluentMongo to remove and update documents

I was wondering if anyone has a clean way to handle removing and updating documents using FluentMongo? I am creating a repository layer using FluentMongo; however, not being able to remove or update documents is proving troublesome. Perhaps I…
rboarman
  • 8,248
  • 8
  • 57
  • 87
2
votes
1 answer

Fluentd not sending parsed logs to Mongo

I am using Fluentd to parse the logs and store the parsed log in MongoDB. My application is generating the following logs: [2018-01-25 17:50:22] 192.168.10.1 GET http://localhost.com/mypage html 0 Mozilla/5.0 200 132 Fluentd is parsing the logs…
Veer Shrivastav
  • 5,434
  • 11
  • 53
  • 83
1
vote
1 answer

Grouping by multiple values when using dynamic linq and fluent mongo causes a malformed map-reduce emit statement

I'm using dynamic link to run mapreduce queries and I'm running into a problem when trying to group by multiple values. Check this out: This works fine: var query = contentDeliveryAggregates.AsQueryable().Where("_id.CId == 1 && _id.CdaId == 1 &&…
1
vote
1 answer

Mongo query to get children

I am using fluent mongo. I have an entity as public class SomeList { public List Likes { get; set; } public List Comments { get; set; } public List ListItems { get; set; } } the ListItem is…
Devesh Tipe
  • 141
  • 10
1
vote
1 answer

FluentMongo throwing error all of a sudden

I am using FluentMongo and the MongoDBCSharpDriver. My code was working fine for a while, but after updating my MongoCSharpDriver, I now I keep getting this error when I try to query the database: "Discriminators can only be registered for classes,…
jrizzo
  • 1,652
  • 4
  • 17
  • 29
1
vote
2 answers

MongoDb querying embedded collection with filtering/ordering

Let's imagine a usual blog engine (just for example). The model would consist of Posts collection with embedded Comments "collection". Now, I need to get only 10 recent comments along with my Post data. What's the best way of doing this? Is this a…
Kostassoid
  • 1,870
  • 2
  • 20
  • 29
1
vote
1 answer

MongoDB C# driver throwing an exception with LINQ

I am building an application that uses Mongo and the offical C# driver. I am having an odd problem when using interfaces and generic type constraints. Consider the following: interface IMongoObject { BsonObjectId Id { get; set; } string…
didster
  • 882
  • 5
  • 9
0
votes
2 answers

How to get "real" mongo query when running fluent-mongo

When running my application I have to write to screen raw query used. Is any method/extension method available, to get from this: IQueryable alldata = hr.GetCollection"EventsReceiver").AsQueryable().Where(q => q.UserId == "123"); something similar…
user603483
  • 43
  • 6
0
votes
1 answer

Number of products in category in mongodb (FluentMongo)

I am trying to fix performance issue with mongodb and one of issue is that system read number of products in each category with every page load. Project uses C# and FluentMongo to access database. (and this wasn't my idea :) Ideally, i want to get…
st78
  • 8,028
  • 11
  • 49
  • 68