nHibernate multiple classes pointing to same table?
- by Amitabh
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 LightContact
{
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?