/mono-mongodb/Race/Race/Main.cs |
---|
1,6 → 1,5 |
using System; |
using MongoDB.Bson.Serialization; |
using MongoDB.Driver; |
namespace Race |
9,15 → 8,6 |
{ |
public static void Main (string[] args) |
{ |
BsonClassMap.RegisterClassMap<Participant> |
( |
cm => |
{ |
cm.AutoMap(); |
cm.GetMemberMap(c => c.Email).SetIgnoreIfNull(true); |
} |
); |
// Get a Reference to the Client Object. |
string connectionString = "mongodb://localhost"; |
MongoClient client = new MongoClient(connectionString); |