This is my POCO:
private class Widget
{
public int Id { get; set; }
[BsonElement("x")]
public int X { get; set; }
public override string ToString()
{
return "Id: " + Id + " X: " + X;
}
}
And I get an error on the BsonElement
attribute:
I'm using:
Framework: .NET v4.5,
References: MongoDB.Driver.dll v2.0.1, MongoDB.BSON.dll v2.0.1
IDE: Visual Studio Premium 2012
Seems to work fine for the guy in this video.