nhibernate最新書籤


Icon_arrow_right 1770 天前 
687961

b# - A Journey with Domain Driven Design (and NHibernate) - Part 4 Popup

b# - A Journey with Domain Driven Design (and NHibernate) - Part 4 Popup

elleryq 收藏於 2007/07/26
Anyway, last time we introduced some very basic unit tests. We simply verified that we can indeed create each object and pass in the invariants as constructor parameters. The only real decision making that this influenced was how to create objects. For example, it is no problem at all to allow direct creation (public constructor) on root objects such as Movie, Video, Account, and Customer, however I chose not to let Transaction be created directly, rather it is created from an existing Account object. The reason for this is simple. Picture what happens at a video store: You go to the counter with your card and your videos, the employee scans the card and sees your account details. The next thing that the employee will do is start a new transaction. An account object is always present at the time that we need to get a transaction object. Another reason for this is I decided to satisfy the invariants of the transaction (specifically the account) at creation time.
687962

b# - A Journey With NHibernate (and DDD) - Part 3 Popup

b# - A Journey With NHibernate (and DDD) - Part 3 Popup

elleryq 收藏於 2007/07/26
I decided to somewhat rename this series to include Domain-Driven Design. It became apparent after Part One and Part Two that I will spend a lot of time just developing the domain model. I could either skip this step and start with a fully functional model, ready for persistence, or I can slow down a bit and focus on creating the domain model as well. Due to some recent feedback I am choosing to focus a bit on modeling the application. This will of course delay the NHibernate specifics, but a good understanding of the object model is crucial to effective object-relational mapping. On we go….
687958

b# - A Journey With NHibernate - Part 2 Popup

b# - A Journey With NHibernate - Part 2 Popup

elleryq 收藏於 2007/07/26
This time I am going to start off creating a pet project to demonstrate how to implement these ideas. First we’ll implement a simple domain model to support our features. We will combine these with unit tests to verify behavior. Let’s create a dummy video rental system. We’ll call it Videocracy (hey, that’s pretty good!). In this sytem we’ll have to support the following features: * Add new Customer / Account * Add other members to an account * Restrict certain members from renting certain content * Query for a Customer by Customer # (swipe card, etc), phone number, or last name * Add new rental item (movie, video game, game console, vcr, etc) * Rent an item to a customer * Check items back in from a customer * Get movies checked out for a customer * Calculate late fees for a customer * Query for an item, see who has it
687959

b# - A Journey with NHibernate - Part 1 Popup

b# - A Journey with NHibernate - Part 1 Popup

elleryq 收藏於 2007/07/26
In this series of articles, I am going to dive into some topics with NHibernate. There is a lot of beginner information on the internet, but not a whole lot of real-life examples. I’ve seen countless exaples where the author builds a session factory, creates a session, and does some persistence all inside a single method or block of code. This is of course ludicrous for real projects. This is something I’d like to address. I’ll try to focus on things like proper object-oriented design and testability with your projects. In the first few articles, we will see how to start projects using NHibernate, go over some basic topics, and then get progressively more complex as we explore the many features of the ORM tool. If you don’t know what NHibernate is, I’d suggest a google search or going to the NHibernate home page.
Icon_arrow_right 1800 天前 
613734

NHibernate Query Generator « .net and other musings Popup

NHibernate Query Generator « .net and other musings Popup

elleryq 收藏於 2007/06/26
NHQG is a console application which when pointed at your NHibernate mapping files, produces a bunch of partial classes for the types in your domain model which ultimately generate NHibernate DetachedCriteria. The real goodness is in the expressiveness of the querying API which they create.
[推薦] 點點印,把你的照片變成寫真書/照片書!
[2012] 做自己的畢業紀念冊畢業禮物推薦

這些內容是怎麼產生的?

黑米沒有編輯,所有內容都是使用者貢獻。網站每天會分析最近最多人收藏的書籤,越多人收藏,排在越上面。綠色的數字代表收藏推薦的人數。

書籤心得

需要幫忙嗎?
黑米小工具

黑米數位版權所有 Copyright© 2006-2008 HEMiDEMi. All Rights Reserved.