Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 June 18th, 2009, 11:42 PM
Registered User
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Architectural Doubt

I just finished reading through chapter 2 and started reading chapter 3. I have a few questions architecturally.

1. Why does the author not implement the insert(),update(), delete() methods of the ENTUserAccountData class using the default Datacontext class without passing the connection string as a parameter.

For example the author has 2 overloaded the insert() methods like
Insert(string connection string, parameter 1,.....)
Insert(DataContext, parameter1....)


Can is it a good practice to implement a third overload like so using the default DataContext.
Insert(parameter1,parameter2...)


2.
While implementing the Insert(),Update(),Delete() method, why can we not pass the Entity object as the parameter instead of passing scalar variables.

So apart from
Insert(DataContext, parameter1,parameter2....)

We could implement
Insert(DataContext, EntityObject)

I understand the author has chosen the design pattern of passing entity objects from the DAL to the BLL..and scalar values to the DAL from the BAL.
Why should we not pass entity objects back to the DAL from the BLL???


------------------------------
I hope that my questions make some sense...
 
Old June 28th, 2009, 09:27 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

This is a good question. Both options are perfectly viable. In fact, we've enhanced the framework at my work to implement your second point. We pass the entity objects back and forth instead of parameters.
My goal of the book was to give people a starting point so they can extend and enhance the framework themselves.

Good Luck





Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt hamnapalakkal Crystal Reports 0 February 4th, 2008 12:27 AM
doubt somavenki .NET Framework 2.0 2 February 3rd, 2008 11:29 AM
doubt sampathk Visual Basic 2005 Basics 1 November 28th, 2006 02:45 PM
doubt! kk_katepally ASP.NET 1.0 and 1.1 Basics 1 February 7th, 2006 01:58 PM
doubt naveen J2EE 1 April 6th, 2004 07:42 PM





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