I\'m using MongoDB via the official C# driver with an ASP.NET MVC web site.
I have the following C# model:
public class Contact { public ObjectId Id
var IDict = v as IDictionary; var dict = IDict.ToDictionary(x => x.Key, x => x.Value); var dateVal = dict["$date"]; var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); var dateTimeVal = epoch.AddMilliseconds(Convert.ToDouble(dateVal));