using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataBase.Model;
//FluentNHibernate可以在项目名右键的管理NuGet程序包里直接搜索FluentNHibernate安装
using FluentNHibernate.Mapping;
namespace DataBase.Mapping
{
class TestUserMap :ClassMap <TestUser>
{
public TestUserMap() //这里的x是testuser的对象
{
Id(x => x.Id).Column("id");//设置id属性为组建
Map(x => x.Username).Column("username");
Map(x => x.Password).Column("password");
Map(x => x.Age).Column("age");
Table("testuser");
}
}
}