Search
 
SCRIPT & CODE EXAMPLE
 

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();
Comment

PREVIOUS NEXT
Code Example
Csharp :: upgrade asp.net core to 5.0 
Csharp :: c# cancellationtoken example 
Csharp :: html beginform 
Csharp :: route attribute controller with parameter asp.net core 
Csharp :: unity instantiate prefab 
Csharp :: unity call function from another script 
Csharp :: c# string from b64 
Csharp :: calculate distance using latitude and longitude c# 
Csharp :: Task.FromResult(null) 
Csharp :: what is botnet attack 
Csharp :: public gameobject unity 
Csharp :: scene switch unity 
Csharp :: c# console password 
Csharp :: datetime check null c# 
Csharp :: get key value from object c# 
Csharp :: c# for statement 
Csharp :: c# get last day of month 
Csharp :: how to make an ui to follow gameobject 
Csharp :: linq query to check if record exists 
Csharp :: multiplication of long numbers 
Csharp :: .net mvc return a specific View 
Csharp :: increase value in dictionary against a key in c# 
Csharp :: c# right function 
Csharp :: unity get gameobject from hit 
Csharp :: how to get current dir in c# 
Csharp :: check if value in list c# 
Csharp :: how to add a force to an object unity 
Csharp :: string to char array c# 
Csharp :: Data at the root level is invalid. Line 1, position 1. 
Csharp :: Plugging a Third-Party IoC Container (e.g. AutoFac) into .NET Core 6 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =