Created
September 20, 2011 17:48
-
-
Save mstarkman/1229775 to your computer and use it in GitHub Desktop.
Ignoring Extra Elements in mongodDB C# driver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Person | |
{ | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
} | |
public class PersonWithBirthDate : Person | |
{ | |
public DateTime DateOfBirth { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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