This article is a mirror article of machine translation, please click here to jump to the original article.

View: 199323|Reply: 69

[Communication] .NET/C# 4 Ways to Implement MongoDB Queries and Fuzzy Queries [with Source Code]

  [Copy link]
Posted on 10/9/2016 11:06:20 AM | | | |


Version: MongoDB.Driver v2.3.0.157

There is relatively little code for this driver version on the Internet, and it should be that this driver has just been released, and I use this driver to implement mongodb queries

One way is to query with linq via AsQueryable and another way is to query with Find, of course, both can support lambda expressions

Support fuzzy query and exact query, support sorting, pagination is not done, in fact, pagination is very simple, and there is an extension method later.

I wrote 15 ways to call it, and the code is as follows:



Finally, attach the source code:

Tourists, if you want to see the hidden content of this post, pleaseReply





Previous:C# programs run with administrator privileges
Next:C# reflection gets the displayname of the object property
Posted on 12/5/2017 3:31:53 PM |
{:1_12:} {:1_12:} {:1_12:} {:1_12:} {:1_12:} {:1_12:} {:1_12:}
Posted on 12/1/2020 1:19:58 AM |
T/C# Implement MongoDB Query and Fuzzy Query in 4 Ways [With Source Code] [Modified]
Posted on 6/11/2017 11:43:28 AM |
I have not been exposed to it before, and I hope it can provide useful knowledge
Posted on 11/28/2016 4:05:30 PM |
See if it works
Posted on 12/9/2016 3:57:20 PM |
Learn, this thing is not easy to find
Posted on 12/10/2016 5:26:37 PM |
fffffffffffffffffffffffffffffffffffff

Score

Number of participants1MB-20 contribute-20 Collapse reason
Little scum -20 -20 Please do not pour water, it is the duty of every member to improve the reply information.

See all ratings

Posted on 12/12/2016 11:29:21 AM |
Mongohelper needs to be released
Posted on 12/14/2016 10:44:12 AM |
Support it, learn
Posted on 12/15/2016 4:01:00 PM |
1123123213213213213

Score

Number of participants1MB-1 contribute-1 Collapse reason
QWERTYU -1 -1 Please do not pour water, it is the duty of every member to improve the reply information.

See all ratings

Posted on 12/15/2016 4:11:56 PM |
{:1_1:} {:1_1:} {:1_1:} {:1_1:}
Posted on 12/21/2016 11:03:34 PM |
, thank you
Posted on 12/30/2016 4:11:34 PM |
Asda's talented scholar is a cave

Score

Number of participants1MB-1 contribute-1 Collapse reason
QWERTYU -1 -1 Please do not pour water, it is the duty of every member to improve the reply information.

See all ratings

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com