111,094
社区成员




School school = new School();
school.SchoolName = TextBox2.Text;
school.SchoolAddress = TextBox3.Text;
school.HeadMaster = TextBox4.Text;
school.SchoolId = TextBox1.Text;
NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration();
cfg.AddAssembly("Coln.Net.MyNHibernate");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession s = factory.OpenSession();
ITransaction t = s.BeginTransaction();
s.Save(school);//程序在这里出错
t.Commit();