Loading

随笔分类 -  Nhibernate

摘要:本篇描述如何使用GridView(需要实现IPageableItemContainer接口)加DataPager实现分页功能。并使用ObjectDataSource控件来获得数据源实现分页。 1,O... 阅读全文
posted @ 2010-09-29 12:28 .net's 阅读(888) 评论(0) 推荐(0)
摘要:Nhibernate 2.1.0 support for bulk actions using HQL. Some HQL examples: 阅读全文
posted @ 2010-09-22 13:51 .net's 阅读(477) 评论(0) 推荐(0)
摘要:开场白表结构的准备Table: CustomerCustomerId: int, auto-increment PKFirstname: varchar50, nullableLastname: varchar50, nullableCREATE TABLE [dbo].[Customer]( [CustomerId] [int] IDENTITY(1,1) NOT NULL, [Firstname] [varchar](50) NULL, [Lastname] [varchar](50) NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED 阅读全文
posted @ 2010-08-28 15:23 .net's 阅读(1284) 评论(0) 推荐(0)
摘要:摘要:使用HQL返回自定义类型的结果集。 前提:已经定义好Customer类及其Nhibernate映射文件xml。 表结构及数据 自定义类 Mapping文件 条件查询(Criteria Query) 输出SQL 说明CustomerFirstnameCounter中的Count属性必须定义为long类型,如果定义为int类型,则会报如下错误: 阅读全文
posted @ 2010-08-25 21:32 .net's 阅读(1054) 评论(4) 推荐(0)
摘要:In Solution Explorer, under Solution Items, double-click the test settings file, Local.testsettings.       The Test Settings dialog box is displayed. Select <Local machine ... 阅读全文
posted @ 2010-08-22 10:13 .net's 阅读(1274) 评论(0) 推荐(0)
摘要:方式一:方式二:Product类所在的程序集 阅读全文
posted @ 2010-08-19 08:38 .net's 阅读(265) 评论(0) 推荐(0)
摘要:http://oss.org.cn/ossdocs/framework/hibernate/reference-v3_zh-cn/http://nhforge.org/doc/nh/en/index.html 阅读全文
posted @ 2010-08-18 14:35 .net's 阅读(517) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2010-08-15 18:09 .net's 阅读(306) 评论(0) 推荐(0)
摘要:发现文件名少了hbm.错误类型:1,检查hbm.xml文件2,检查hibernate.cfg.xml是否配置mapping 如:<mapping assembly=”Ordering.Data”/>3, 检查Role.hbm.xml文件属性“生成操作”的值,从“内容”修改为“嵌入的资源” 阅读全文
posted @ 2010-08-15 17:08 .net's 阅读(812) 评论(0) 推荐(1)
摘要:method 1: method 2: behind-code 阅读全文
posted @ 2010-08-01 12:21 .net's 阅读(474) 评论(0) 推荐(0)