Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > BOOK: Professional ASP.NET Design Patterns
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET Design Patterns
This is the forum to discuss the Wrox book Professional ASP.NET Design Patterns by Scott Millett; ISBN: 978-0-470-29278-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET Design Patterns section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 21st, 2011, 06:21 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default iunitofwork / iunitofworkrepository

Hey Scott,
neat book, learning a lot from it and your other arch books. At the moment I'm seeking a bit of clarification.

In the book chapters itself (not the case study which there are errors as _uow is not hooked into) you have an Iunitofwork iface which gets implemented by nhibernate which essentially delgates down to session.save/session.delete etc.

However in the base repository class you call, registernew etc. while always passing in null for an implementation of Iunitofworkrepostory, why is this? It is just another layer of abstraction in case a different ORM does it differently?
Reply With Quote
  #2 (permalink)  
Old December 5th, 2011, 12:16 PM
elbandit's Avatar
Wrox Author
Points: 599, Level: 8
Points: 599, Level: 8 Points: 599, Level: 8 Points: 599, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2007
Location: Southsea, Portsmouth, Hampshire, United Kingdom.
Posts: 107
Thanks: 10
Thanked 17 Times in 15 Posts

hi Mr David,

Thanks for buying the book. Yes the implementation is to support a non ORM scenario, if you read the Unit of Work section in the book at page 198 it describes the roles of IUnitOfWorkRepostory and later in the chapter why is isn't needed for ORMs. I tend to now favor having the transactions hook up to the start and end of a request (session per request http://code.google.com/p/walkme/sour...equest+.cs?r=8) or before and after action on a controller (like http://ayende.com/blog/4809/refactor...t-transactions) so that I don't have to keep explicitly calling commit.

let me know if you need any more details.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

All times are GMT -4. The time now is 01:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.