Nhibernate mapping

Posted by john on Stack Overflow See other posts from Stack Overflow or by john
Published on 2010-03-18T07:12:21Z Indexed on 2010/03/18 7:21 UTC
Read the original article Hit count: 678

Hi All

I am trying to map Users to each other. The senario is that users can have buddies, so it links to itself

I was thinking of this

  public class User
    {
        public virtual Guid Id { get; set; }
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual string EmailAddress { get; set; }
        public virtual string Password { get; set; }
        public virtual DateTime? DateCreated { get; set; }
        **public virtual IList<User> Friends { get; set; }**
        public virtual bool Deleted { get; set; }
    }

But am strugling to do the xml mapping.

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about nhibernate-mapping