Hi forum users,
At execution I have this error:
Code:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: NHibernate.MappingException: Unknown entity class: HSS.Com.VisitorManagement.BusinessObjects.User
Could it be because the SQL table isn't correctly mapped?
The Table:
Code:
CREATE TABLE [dbo].[TBL_User] (
[UserId] [int] IDENTITY (1, 1) NOT NULL ,
[lastModified] [timestamp] NULL ,
[userName] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[firstName] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[lastName] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[password] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[email] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[status] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[createDate] [datetime] NULL ,
[createdByUserId] [int] NULL
) ON [PRIMARY]
The XML mapping:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="HSS.Com.VisitorManagement.BusinessObjects.User,HSS.Com.VisitorManagement.BusinessObjects" table="TBL_User">
<id name="UserId" column="UserId" type="System.Guid" unsaved-value="00000000-0000-0000-0000-000000000000">
<generator class="guid" />
</id>
<property column="lastModified" type="byte[]" name="LastModified" />
<property column="userName" type="String" name="UserName" length="50" />
<property column="firstName" type="String" name="FirstName" length="50" />
<property column="lastName" type="String" name="LastName" length="50" />
<property column="password" type="String" name="Password" length="50" />
<property column="email" type="String" name="Email" length="50" />
<property column="status" type="String" name="Status" length="50" />
<property column="createDate" type="DateTime" name="CreateDate" />
<property column="createdByUserId" type="Int32" name="CreatedByUserId" />
</class>
</hibernate-mapping>
Thank a lot for your ideas and help.
Reguards,
Pierre