问个Nhibernate的入门知识啊,我写的一个简单实例总调不出来
我在那个官网下了最新的版本。
建立一个window应用程序。在“引用”里面添加了Nhibernate.dll
这是类文件:
using System;
using System.Collections.Generic;
using System.Text;
namespace Nhibernate
{
class User
{
private string id;
private string userName;
private string password;
private string emailAddress;
private DateTime lastLogon;
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; }
}
}
}
这是映射文件:
<?xml version= "1.0 " encoding= "utf-8 "