<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_ALinq －－最为完美的 Linq to DB 解决方案_分类_[30] NHibernate</title><id>http://feed.cnblogs.com/blog/u/28328/category/322451/rss</id><updated>2012-05-29T13:29:44Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/category/322451.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/28328/category/322451/rss"/><entry><id>http://www.cnblogs.com/ansiboy/archive/2011/08/26/2154196.html</id><title type="text">NHibernate 快速入门（四）使用 HQL 查询数据</title><summary type="text">1、from 子句var db = new NorthwindDataContext();var categories = db.Session.CreateQuery("from Category") .List&lt;Category&gt;();foreach (var category in categories){ Console.WriteLine(category.CategoryName);}2、select 子句var db = new NorthwindDataContext();var categories = db.Sess...</summary><published>2011-08-26T03:36:00Z</published><updated>2011-08-26T03:36:00Z</updated><author><name>麦舒</name><uri>http://www.cnblogs.com/ansiboy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/ansiboy/archive/2011/08/26/2154196.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/archive/2011/08/26/2154196.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152390.html</id><title type="text">NHibernate 快速入门教程（Visual Entity 初学者必看）</title><summary type="text">前言：本教程主要针对 NHibernate 初学者，让新手快速入门。在这里用到的软件是 Visual Entity ，如果你对 Visual Entity 还不了解。请点击这里软件要求：1、Visual Studio 2008 或 Visual Studio 20102、Visual Entity for VS2008 或 Visual Entity for VS2010目录：创建我的第一个 NHibernate 应用程序创建一对多关系创建多对多关系使用 HQL 查询数据</summary><published>2011-08-24T10:28:00Z</published><updated>2011-08-24T10:28:00Z</updated><author><name>麦舒</name><uri>http://www.cnblogs.com/ansiboy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152390.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152390.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152084.html</id><title type="text">NHibernate 快速入门（三）创建多对多关系</title><summary type="text">1、将表 Employees、EmployeeTerritories、Territories 三个表拖放到设计器上。如下图所示：2、右键点击 EmployeeTerritory 实体类，在弹出的菜单中，选择 Convet to M:M Association 菜单项。3、运行代码static void Main(string[] args){ var dc = new NorthwindDataContext(); var territories = dc.Territories; foreach (var territory in territories) { ...</summary><published>2011-08-24T10:03:00Z</published><updated>2011-08-24T10:03:00Z</updated><author><name>麦舒</name><uri>http://www.cnblogs.com/ansiboy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152084.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/archive/2011/08/24/2152084.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/ansiboy/archive/2011/08/23/2151105.html</id><title type="text">NHibernate 快速入门（二）创建一对多关系</title><summary type="text">1、将 Products 表拖放到设计器上2、Visual Entity 将会自动生成下面的代码DataContext 代码DataContextpublic partial class NorthwindDataContext : NHibernate.Linq.NHibernateContext{ public NorthwindDataContext(NHibernate.ISession session) : base(session) { } public NorthwindDataContext() : ...</summary><published>2011-08-23T10:00:00Z</published><updated>2011-08-23T10:00:00Z</updated><author><name>麦舒</name><uri>http://www.cnblogs.com/ansiboy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/ansiboy/archive/2011/08/23/2151105.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/archive/2011/08/23/2151105.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/ansiboy/archive/2011/08/23/2149140.html</id><title type="text">NHibernate 快速入门（一）创建我的第一个 NHibernate 应用程序</title><summary type="text">1、软件安装1）Visual Studio 2008 with.net Framework 3.5或 Visual Studio2）Visual Entity for VS2008 或 Visual Entity for VS20103）Northwind 数据库（任意一种 Visual Entity 所支持的数据库）本文中采用的数库是 Access 数据库。2、创建第一个持久化类1）创建一个 Console Application项目，然后添一个 Northwind.nhib 到项目中，如下图所示。2）在 ServerExplorer 面板上创建 Northwind 数据库连接3）将表 Ca</summary><published>2011-08-23T06:31:00Z</published><updated>2011-08-23T06:31:00Z</updated><author><name>麦舒</name><uri>http://www.cnblogs.com/ansiboy/</uri></author><link rel="alternate" href="http://www.cnblogs.com/ansiboy/archive/2011/08/23/2149140.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/ansiboy/archive/2011/08/23/2149140.html"/><content type="html"/></entry></feed>
