NHibernate中的主配置文件和类配置文件

//“复制到输出目录”属性:始终复制


  
    NHibernate.Connection.DriverConnectionProvider
    NHibernate.Dialect.MySQL5Dialect
    NHibernate.Driver.MySQLDataDriver
    
    Server=localhost;Port=3306;Database=mygamedb;User ID=root;Password=root;

    true
  
“生成操作”属性:嵌入的资源



  
    
      
    

    
    
    
  
  
  
  
    
      
    
    
    
    
  

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XpLearning.Model
{
    class User
    {
        public virtual int Id { set; get; }
        public virtual string Usermame { set; get; }
        public virtual string Password { set; get; }
        public virtual DateTime Registedate { set; get; }
    }
}

你可能感兴趣的:(C#,MySQL)