Last active
December 12, 2015 06:28
-
-
Save SeanFeldman/4728972 to your computer and use it in GitHub Desktop.
Polymorphic property with RavenDB
This file contains hidden or 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 Listing | |
{ | |
public string Id { get; set; } | |
public string Name { get; set; } | |
public AdditionalInfo Info { get; set; } | |
} | |
public abstract class AdditionalInfo | |
{ | |
} | |
class AdditionalInfoForPark : AdditionalInfo | |
{ | |
public string[] Amenities { get; set; } | |
} | |
class AdditionalInfoForEvent : AdditionalInfo | |
{ | |
public DateTime Start { get; set; } | |
public DateTime End { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment