public Question(BsonValue bsonValue) { this.Id = bsonValue.TryGetString("_id", String.Empty); this.UserIdAsked = bsonValue.TryGetInt32("UserIdAsked", 0); this.UserIdAnswered = bsonValue.TryGetInt32("UserIdAnswered", 0); this.AskedByName = bsonValue.TryGetString("AskedByName", String.Empty); this.AskedByEmail = bsonValue.TryGetString("AskedByEmail", String.Empty); this.AskedByPhone = bsonValue.TryGetString("AskedByPhone", String.Empty); this.DateTime = bsonValue.TryGetNullableDateTime("DateTime", new Nullable <DateTime>()); this.Text = bsonValue.TryGetString("Text", String.Empty); this.Area = bsonValue.TryGetString("Area", String.Empty); this.Views = bsonValue.TryGetInt32("Views", 0); this.Approved = bsonValue.TryGetBoolean("Approved", false); this.Archived = bsonValue.TryGetBoolean("Archived", false); this.Removed = bsonValue.TryGetBoolean("Removed", false); this.Replied = bsonValue.TryGetBoolean("Replied", false); }