Skip to content

Instantly share code, notes, and snippets.

@tkellogg
Created March 20, 2012 03:35
Show Gist options
  • Save tkellogg/2130909 to your computer and use it in GitHub Desktop.
Save tkellogg/2130909 to your computer and use it in GitHub Desktop.
Basic object model for mongo-nhibernate abstract data layer
public abstract class DomainObject : IDomainObject
{
public virtual object Id { get; set; }
#region Overloads of Equals & GetHashCode
// ...
#endregion
}
public class User : DomainObject
{
public virtual string Email { get; set; }
public virtual Name Name { get; set; }
}
public class Name : DomainObject
{
public virtual string First { get; set; }
public virtual string Last { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment