Using Lite Version of Entity in nHibernate Relations?

Posted by Amitabh on Stack Overflow See other posts from Stack Overflow or by Amitabh
Published on 2010-03-12T19:08:15Z Indexed on 2010/03/18 0:11 UTC
Read the original article Hit count: 748

Is it a good idea to create a lighter version of an Entity in some cases just for performance reason pointing to same table but with fewer columns mapped. E.g If I have a Contact Table which has 50 Columns and in few of the related entities I might be interested in FirstName and LastName property is it a good idea to create a lightweight version of Contact table. E.g.

public class ContactLite
{
   public int Id {get; set;}
   public string FirstName {get; set;}
   public string LastName {get; set;}

}

Also is it possible to map multiple classes to same table?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about castle-activerecord