Hi,
I have an entity class Customer which as the property Address that is an object of the Address class and that has few properties. It looks as follows:
public partial class Customer
{
public virtual int ID { get; set; }
public virtual string Symbol { get; set; }
public virtual string Name { get; set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual string NIP { get; set; }
public virtual Address Address { get; set; }
}
public partial class Address
{
public virtual int ID { get; set; }
public virtual string Descriptive { get; set; }
public virtual string Street { get; set; }
public virtual string City { get; set; }
public virtual string PostCode { get; set; }
public virtual string Country { get; set; }
}
There's no relation between them in the sanse of database or entities. The Address is just an object contained in the Customer class and they are produced by an NHibernate framework. In fact the <component /> mapping element is being used for that:
<class name="Customer" table="`CRM_CUSTOMER`">
<id name="ID">
<generator class="native" />
</id>
<property name="Symbol" unique="true" />
<property name="Name" />
<property name="FirstName" />
<property name="LastName" />
<property name="NIP" />
<component name="Address" class="Address">
<property name="Descriptive" />
<property name="Street" />
<property name="City" />
<property name="PostCode" />
<property name="Country" />
</component>
</class>
However, the client generated code does not see an Address class/property at all. Nothing helps. Have read tons of articles and nothing. So if anyone could help, than it would be really really appreciated :)
I am using VS 2010 Proffesional.
TIA
Roland