I am new to NHibernate and have just started right now.
I have very simple table contain Id(Int primary key and auto incremented), Name(varchar(100)), Description(varchar(100))
Here is my XML
<class name="DevelopmentStep" table="DevelopmentSteps" lazy="true">
<id name="Id" type="Int32" column="Id">
</id>
<property name="Name" column="Name" type="String" length="100" not-null="false"/>
<property name="Description" column="Description" type="String" length="100" not-null="false"/>
here is how I want to get all the record
public List<DevelopmentStep> getDevelopmentSteps()
{
List<DevelopmentStep> developmentStep;
developmentStep = Repository.FindAll<DevelopmentStep>(new OrderBy("Name", Order.Asc));
return developmentStep;
}
But I am getting exception
The element 'id' in namespace 'urn:nhibernate-mapping-2.2' has incomplete content. List
of possible elements expected: 'urn:nhibernate-mapping-2.2:meta urn:nhibernate-mapping-
2.2:column urn:nhibernate-mapping-2.2:generator'.
Please Advise me --- Thanks