Click here to Skip to main content
16,005,037 members
Home / Discussions / C#
   

C#

 
AnswerRe: ASP.Net 2.0 Pin
Sathesh Sakthivel12-Jul-07 19:38
Sathesh Sakthivel12-Jul-07 19:38 
GeneralRe: ASP.Net 2.0 Pin
Ron.S12-Jul-07 19:41
Ron.S12-Jul-07 19:41 
AnswerRe: ASP.Net 2.0 Pin
RepliCrux12-Jul-07 19:40
RepliCrux12-Jul-07 19:40 
AnswerRe: ASP.Net 2.0 Pin
sidbaruah12-Jul-07 19:52
sidbaruah12-Jul-07 19:52 
GeneralRe: ASP.Net 2.0 Pin
Ron.S12-Jul-07 20:00
Ron.S12-Jul-07 20:00 
GeneralRe: ASP.Net 2.0 Pin
sidbaruah12-Jul-07 20:04
sidbaruah12-Jul-07 20:04 
AnswerRe: ASP.Net 2.0 Pin
T.EDY12-Jul-07 20:04
T.EDY12-Jul-07 20:04 
QuestionUnknown entity class: NHibernate.Examples.QuickStart.User Pin
itbrainsoft12-Jul-07 19:16
itbrainsoft12-Jul-07 19:16 
It is users.sql :

use NHibernate
go

CREATE TABLE users (
LogonID nvarchar(20) NOT NULL default '0',
Name nvarchar(40) default NULL,
Password nvarchar(20) default NULL,
EmailAddress nvarchar(40) default NULL,
LastLogon datetime default NULL,
PRIMARY KEY (LogonID)
)
go


It is users.cs :

using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;


namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;

private string emailAddress;
private DateTime lastLogon;


public User()
{
}

public string Id
{
get { return id; }
set { id = value; }
}

public string UserName
{
get { return userName; }
set { userName = value; }
}

public string Password
{
get { return password; }
set { password = value; }
}

public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}

public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}

}

//interface ISession
//{
// void save(users newUser);

// void Save(users newUser);
//}

}


It is User.hbm.xml :

using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;


namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;

private string emailAddress;
private DateTime lastLogon;


public User()
{
}

public string Id
{
get { return id; }
set { id = value; }
}

public string UserName
{
get { return userName; }
set { userName = value; }
}

public string Password
{
get { return password; }
set { password = value; }
}

public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}

public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}

}

//interface ISession
//{
// void save(users newUser);

// void Save(users newUser);
//}

}

It is App.config :


<configuration>

<configsections>



<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider">
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect">
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver">
<add key="hibernate.connection.connection_string" value="Data Source=dev2;Initial Catalog=NHibernate;User ID=sa;Password=buyagift;">





It is Programs.cs :

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace NHibernate
{
static class Program
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Application.Run(new NHibernate.Form1());
Application.Run(new NHibernate.Examples.QuickStart.Form1());

}
}
}



This code generates following error:

Unknown entity class: NHibernate.Examples.QuickStart.User

Can anyone help me please?
Thanks


shoaib

AnswerRe: Unknown entity class: NHibernate.Examples.QuickStart.User Pin
Malcolm Smart12-Jul-07 21:32
Malcolm Smart12-Jul-07 21:32 
AnswerRe: Unknown entity class: NHibernate.Examples.QuickStart.User Pin
Larantz13-Jul-07 0:44
Larantz13-Jul-07 0:44 
QuestionBinding data to Listview Pin
T.EDY12-Jul-07 18:31
T.EDY12-Jul-07 18:31 
AnswerRe: Binding data to Listview Pin
Sathesh Sakthivel12-Jul-07 18:44
Sathesh Sakthivel12-Jul-07 18:44 
GeneralRe: Binding data to Listview Pin
T.EDY12-Jul-07 19:58
T.EDY12-Jul-07 19:58 
AnswerRe: Binding data to Listview Pin
RepliCrux12-Jul-07 19:00
RepliCrux12-Jul-07 19:00 
QuestionSynchronize SQL and Access in .NET 2005 Pin
Elizma12-Jul-07 18:11
Elizma12-Jul-07 18:11 
AnswerRe: Synchronize SQL and Access in .NET 2005 Pin
Paul Conrad12-Jul-07 18:21
professionalPaul Conrad12-Jul-07 18:21 
GeneralRe: Synchronize SQL and Access in .NET 2005 Pin
Elizma12-Jul-07 18:27
Elizma12-Jul-07 18:27 
GeneralRe: Synchronize SQL and Access in .NET 2005 Pin
Paul Conrad12-Jul-07 18:47
professionalPaul Conrad12-Jul-07 18:47 
QuestionQuick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 17:30
RYU^^12-Jul-07 17:30 
AnswerRe: Quick way to add 1D array to Multidimensional array Pin
Elizma12-Jul-07 18:07
Elizma12-Jul-07 18:07 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 21:45
RYU^^12-Jul-07 21:45 
AnswerRe: Quick way to add 1D array to Multidimensional array Pin
Sathesh Sakthivel12-Jul-07 18:09
Sathesh Sakthivel12-Jul-07 18:09 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 21:46
RYU^^12-Jul-07 21:46 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
J4amieC12-Jul-07 23:57
J4amieC12-Jul-07 23:57 
QuestionWindows Media Player 11 Repeat??? Pin
Small Rat12-Jul-07 11:50
Small Rat12-Jul-07 11:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.