Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

project mongodb c#

int count = 1;
await collection.Find(FilterDefinition<Student>.Empty)
    .Project(x => new {x.FirstName, x.LastName})
    .ForEachAsync(
        student =>
        {
            Console.WriteLine($"{count}. 	 FirstName: {student.FirstName} - LastName {student.LastName}");
            count++;
        });

Console.WriteLine();
Source by www.codementor.io #
 
PREVIOUS NEXT
Tagged: #project #mongodb
ADD COMMENT
Topic
Name
1+7 =