Skip to content

Instantly share code, notes, and snippets.

@mstarkman
Created September 20, 2011 17:48
Show Gist options
  • Save mstarkman/1229775 to your computer and use it in GitHub Desktop.
Save mstarkman/1229775 to your computer and use it in GitHub Desktop.
Ignoring Extra Elements in mongodDB C# driver
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class PersonWithBirthDate : Person
{
public DateTime DateOfBirth { get; set; }
}
[BsonIgnoreExtraElements]
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class PersonWithBirthDate : Person
{
public DateTime DateOfBirth { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment