Interface -> Entity Mapping

Posted by KiD0M4N on Stack Overflow See other posts from Stack Overflow or by KiD0M4N
Published on 2010-03-15T04:54:30Z Indexed on 2010/03/15 4:59 UTC
Read the original article Hit count: 205

Filed under:

Hi guys,

Suppose I have a few definitions like so:

public interface ICategory
{
    int ID { get; set; }
    string Name { get; set; }
    ICategory Parent { get; set; }
}

public class Category : ICategory
{
    public virtual int ID { get; set; }
    public virtual string Name { get; set; }
    public virtual ICategory Parent { get; set; }
}

How do I map such a scenario in NHibernate? I am trying to separate the implementation of the DAL.

I am learning NHibernate.

Regards, Karan

© Stack Overflow or respective owner

Related posts about nhibernate