Skip to content

Instantly share code, notes, and snippets.

@SeanFeldman
Last active December 12, 2015 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanFeldman/4728972 to your computer and use it in GitHub Desktop.
Save SeanFeldman/4728972 to your computer and use it in GitHub Desktop.
Polymorphic property with RavenDB
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