摘要: 气死我了我想执行一条 sql 语句 找半天没做出来向执行一个子查询 又找半天没查到郁闷啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 阅读全文
posted @ 2007-10-15 18:35 草青工作室 阅读(97) 评论(0) 推荐(0) 编辑
摘要: private NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration();cfg.AddAssembly("Entitys");//在集合中自动寻找 xml 文件Private Session session =cfg.BuildSessionFactory().OpenSession();PrivateSystem.Collections.IList list = session.Find("from login");——————————————————————————— 阅读全文
posted @ 2007-10-15 14:01 草青工作室 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 说明:login 为数据库表的实体类 public class UserAccess { //构造函数 public UserAccess() { cfg.AddAssembly("Entitys"); } private NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration(); private ISession session = null; //会话工厂 private ITransaction tran = null; //事务处理 private string m_error = & 阅读全文
posted @ 2007-10-15 11:20 草青工作室 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1.web.config 配置<!-- 必须有的配置节--> <configSections> <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> <nhibernate> <add key= 阅读全文
posted @ 2007-10-15 10:51 草青工作室 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 错误如下!!The following types may not be used as proxies:Entitys.login: method get_Upwd should be virtualEntitys.login: method get_id should be virtualEntitys.login: method get_Uname should be virtualEntitys.login: method set_Uname should be virtualEntitys.login: method get_LastTime should be virtualEnt 阅读全文
posted @ 2007-10-15 09:52 草青工作室 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 将 login 对应的映射文件 login.hbm.xml 设置成“嵌入式资源”方法是 在解决方案资源管理器中找到 该映射文件 右击---属性----在将“生成操作”设置成“嵌入的资源”问题解决!! 阅读全文
posted @ 2007-10-15 09:44 草青工作室 阅读(141) 评论(0) 推荐(0) 编辑