-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
40 lines (33 loc) · 921 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MongoDB.Bson;
using MongoDB.Driver;
namespace contactmgr
{
public class Program
{
public static void Main(string[] args)
{
Contact objContact = new Contact();
try
{
objContact.FirstName = "Manoj";
objContact.LastName = "Mohan";
objContact.Email = "[email protected]";
objContact.Phone = "9686569319";
Console.WriteLine(objContact.Save(objContact));
}
catch (System.Exception)
{
throw;
}
finally
{
objContact = null;
}
}
}
}