Click here to Skip to main content
16,005,037 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: KeyPress event for server control Pin
Archana New to Dotnet12-Jul-07 19:58
Archana New to Dotnet12-Jul-07 19:58 
GeneralRe: KeyPress event for server control Pin
_AK_12-Jul-07 20:06
_AK_12-Jul-07 20:06 
AnswerRe: KeyPress event for server control Pin
RepliCrux12-Jul-07 19:52
RepliCrux12-Jul-07 19:52 
QuestionDuration of video file Pin
Nicejith12-Jul-07 19:30
Nicejith12-Jul-07 19:30 
QuestionPerforming Double Click Event in a ListBox [modified] Pin
Mahesh.J12-Jul-07 19:17
Mahesh.J12-Jul-07 19:17 
AnswerRe: Performing Double Click Event in a ListBox Pin
RepliCrux12-Jul-07 19:29
RepliCrux12-Jul-07 19:29 
GeneralRe: Performing Double Click Event in a ListBox Pin
Mahesh.J12-Jul-07 19:35
Mahesh.J12-Jul-07 19:35 
QuestionUnknown entity class: NHibernate.Examples.QuickStart.User Pin
itbrainsoft12-Jul-07 19:15
itbrainsoft12-Jul-07 19:15 
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
RepliCrux12-Jul-07 19:36
RepliCrux12-Jul-07 19:36 
QuestionDebugging Pin
ASPnoob12-Jul-07 18:02
ASPnoob12-Jul-07 18:02 
AnswerRe: Debugging Pin
Christian Graus12-Jul-07 18:24
protectorChristian Graus12-Jul-07 18:24 
GeneralRe: Debugging [modified] Pin
ASPnoob12-Jul-07 19:25
ASPnoob12-Jul-07 19:25 
Questionadjusting the row height in datagrid asp.net 2003... Pin
moomoooomoo12-Jul-07 17:33
moomoooomoo12-Jul-07 17:33 
AnswerRe: adjusting the row height in datagrid asp.net 2003... Pin
Sathesh Sakthivel12-Jul-07 18:04
Sathesh Sakthivel12-Jul-07 18:04 
GeneralRe: adjusting the row height in datagrid asp.net 2003... Pin
| Muhammad Waqas Butt |13-Jul-07 21:42
professional| Muhammad Waqas Butt |13-Jul-07 21:42 
QuestionDatagrid Checkbox checked value is not getting Pin
Kurian_Kurian12-Jul-07 16:55
Kurian_Kurian12-Jul-07 16:55 
AnswerRe: Datagrid Checkbox checked value is not getting Pin
Imran Khan Pathan12-Jul-07 18:57
Imran Khan Pathan12-Jul-07 18:57 
GeneralRe: Datagrid Checkbox checked value is not getting Pin
Kurian_Kurian12-Jul-07 19:30
Kurian_Kurian12-Jul-07 19:30 
QuestionAbout Crystal Report Pin
wongeva12-Jul-07 15:52
wongeva12-Jul-07 15:52 
AnswerRe: About Crystal Report Pin
Paul Conrad12-Jul-07 17:45
professionalPaul Conrad12-Jul-07 17:45 
QuestionHow to disable a button and still have the click event to fire. Pin
Martin_12-Jul-07 11:09
Martin_12-Jul-07 11:09 
AnswerRe: How to disable a button and still have the click event to fire. Pin
DanB198312-Jul-07 11:47
DanB198312-Jul-07 11:47 
AnswerRe: How to disable a button and still have the click event to fire. Pin
Venkatesh Mookkan12-Jul-07 16:34
Venkatesh Mookkan12-Jul-07 16:34 
AnswerRe: How to disable a button and still have the click event to fire. Pin
K.P.Kannan12-Jul-07 17:16
K.P.Kannan12-Jul-07 17:16 
QuestionMenus and Membership/Role Pin
Amit Kumar G12-Jul-07 10:27
Amit Kumar G12-Jul-07 10:27 

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.