Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2011, 07:11 AM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Client code for Chp 7 UoW

Hi Scott,
Great book. I have learnt so much from it.
Everytime I finish a chapter I try to create client code (console app) for the different patterns covered. I am on the unit of work pattern in chapter 7 but can't figure out how to call the accountservice Transfer method from Main().
Do I have to instatiante an AccountService object first? But its constructor requires IAccountRepository and IUnitOfWork passed in? How do I go about calling Transfer method from main.

Thanks again for the excellent book.

Although post is addressed to Scott, if anyone has any ideas how to go about with this please assist.

Last edited by mwiza; May 31st, 2011 at 11:19 AM.. Reason: Trying to make to get response from not just Scott
 
Old September 20th, 2011, 09:00 AM
elbandit's Avatar
Wrox Author
 
Join Date: May 2007
Posts: 107
Thanks: 10
Thanked 17 Times in 15 Posts
Default

Hi mwiza,

Thanks for buying the book and sorry for the late reply!

Yes you will have to instaniate the account service, you can use an IoC framework (shown in a later chapter) to resolve your dependencies. With web apps I now tend to make the httprequest the unit of work and hook up the unit of work implementation via a httpmodule.

Hope that answers your question.
Cheers
Scott





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp 7 : Dig.js - need to correct code Robert Moses BOOK: Professional XMPP Programming with JavaScript and jQuery 4 March 15th, 2012 01:47 AM
Generating Client Code argyleghost BOOK: Professional WCF 4: Windows Communication Foundation with .NET 4 6 December 29th, 2010 09:42 AM
Why does this code work (chp.6)? wrockinator BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 3 December 3rd, 2008 03:16 AM
problem with client side code thenoseknows ASP.NET 2.0 Professional 5 September 12th, 2006 09:08 AM
Writing Client Side Script from Code-Behind code sajid_pk Classic ASP Databases 1 January 18th, 2005 12:53 AM





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