Click here to Skip to main content
15,867,308 members
Home / Discussions / C#
   

C#

 
AnswerRe: accessing public static member of one class in another class Pin
Matt T Heffron3-Jul-14 12:32
professionalMatt T Heffron3-Jul-14 12:32 
GeneralRe: accessing public static member of one class in another class Pin
KRISHNARAYALU4-Jul-14 0:48
KRISHNARAYALU4-Jul-14 0:48 
GeneralRe: accessing public static member of one class in another class Pin
Pete O'Hanlon4-Jul-14 1:40
subeditorPete O'Hanlon4-Jul-14 1:40 
AnswerRe: accessing public static member of one class in another class Pin
Dave Kreskowiak3-Jul-14 18:05
mveDave Kreskowiak3-Jul-14 18:05 
AnswerRe: accessing public static member of one class in another class Pin
Richard MacCutchan4-Jul-14 0:48
mveRichard MacCutchan4-Jul-14 0:48 
Questionmoving slideshow Pin
Member 109229203-Jul-14 8:36
Member 109229203-Jul-14 8:36 
AnswerRe: moving slideshow Pin
User 48350473-Jul-14 9:22
User 48350473-Jul-14 9:22 
QuestionMongo DB Projection from C# Pin
Ennis Ray Lynch, Jr.3-Jul-14 8:22
Ennis Ray Lynch, Jr.3-Jul-14 8:22 
First let me pre-face, I am not looking for the LINQ answer. LINQ brings the entire document over the wire and then projects the document, which is worthless when trying to reduce network usage. Don't make me go to stack overflow!


Question:
How can I send a find query to MongoDB using the Official C# Mongo class library, and use a server-side projection? When I run
<br />
db.DBNAME.find(<br />
    {_id:'401835_2014_05_01', <br />
     Points: {<br />
         $elemMatch: {<br />
             ExtendedId:"xxxxxxx"<br />
             } <br />
        }<br />
    },<br />
    { "Points.$":1}<br />
)<br />

from the command line (well ROBOMONGO) the world is a happy place and the projection works great. However, there seems to exist no method to call a server-side projection from the C# library????

note, I believe DB.eval can do it but db.eval is for ADMIN only and can lock the database so I am trying to avoid that option.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

"All users always want Excel" --Ennis Lynch

AnswerRe: Mongo DB Projection from C# Pin
Richard Deeming3-Jul-14 8:47
mveRichard Deeming3-Jul-14 8:47 
GeneralRe: Mongo DB Projection from C# Pin
Ennis Ray Lynch, Jr.3-Jul-14 9:20
Ennis Ray Lynch, Jr.3-Jul-14 9:20 
QuestionInternet Cafe Management System Pin
Abdul-Qaadir2-Jul-14 10:14
Abdul-Qaadir2-Jul-14 10:14 
AnswerRe: Internet Cafe Management System Pin
Eddy Vluggen2-Jul-14 12:39
professionalEddy Vluggen2-Jul-14 12:39 
QuestionCannot convert lambda expression to type 'System.Collections.Generic.IEqualityComparer' because it is not a delegate type Pin
caguas2-Jul-14 7:04
caguas2-Jul-14 7:04 
AnswerRe: Cannot convert lambda expression to type 'System.Collections.Generic.IEqualityComparer' because it is not a delegate type Pin
Richard Deeming2-Jul-14 9:42
mveRichard Deeming2-Jul-14 9:42 
GeneralRe: Cannot convert lambda expression to type 'System.Collections.Generic.IEqualityComparer' because it is not a delegate type Pin
caguas3-Jul-14 6:46
caguas3-Jul-14 6:46 
QuestionHow to solve (Use of unassigned local variable) Pin
Jassim Rahma2-Jul-14 0:25
Jassim Rahma2-Jul-14 0:25 
AnswerRe: How to solve (Use of unassigned local variable) Pin
Pete O'Hanlon2-Jul-14 0:43
subeditorPete O'Hanlon2-Jul-14 0:43 
GeneralRe: How to solve (Use of unassigned local variable) Pin
Jassim Rahma2-Jul-14 0:54
Jassim Rahma2-Jul-14 0:54 
AnswerRe: How to solve (Use of unassigned local variable) Pin
Shameel2-Jul-14 1:01
professionalShameel2-Jul-14 1:01 
GeneralRe: How to solve (Use of unassigned local variable) Pin
Pete O'Hanlon2-Jul-14 1:11
subeditorPete O'Hanlon2-Jul-14 1:11 
Questioncode Pin
Member 109187741-Jul-14 23:34
Member 109187741-Jul-14 23:34 
AnswerRe: code Pin
V.1-Jul-14 23:46
professionalV.1-Jul-14 23:46 
AnswerRe: code Pin
Pete O'Hanlon2-Jul-14 0:23
subeditorPete O'Hanlon2-Jul-14 0:23 
AnswerRe: code Pin
Yang Kok Wah2-Jul-14 7:30
Yang Kok Wah2-Jul-14 7:30 
QuestionC# Printer Status Pin
Zeyad Jalil1-Jul-14 22:06
professionalZeyad Jalil1-Jul-14 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.