Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 March 15th, 2007, 07:10 AM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default breaking bll and dal into separate projects

Hi
i went through the book and created the sample website with no problems. i was impressed by the architecture and decided to go through the book again. But, this time I broke out the bll and dal into separate projects.

everything is working fine except for one item. in the biz project i am getting an error in shoppingcart.cs on this line of code

return (HttpContext.Current.Profile as ProfileCommon).ShoppingCart.Items;

both a result of ProfileCommon. the error suggests that i am missing a reference or a using statement. it cannot find ProfileCommon.

i have the using System.Web.Profile;

in fact this error occurs in newsletters also. anyway actually ProfileCommom is used in the bll.
help


 
Old March 15th, 2007, 09:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Profiles are an ASP.NET thing. Maybe you just need to put a reference on System.Web.

Eric

 
Old March 16th, 2007, 06:41 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Tony. I'm in the process of breaking out the bll and dal into seperate projects as well. What kind of problems did you run into? How did you expose the ConfigSection instance to the dal? When the dal and bll were in the same web project, the dal was able to access ConfigSection properties through Global.cs. After moving the dal to it's own project, it no longer has access to globals, and therefore, no longer has access to the data provider types it needs to create an instance of the data provider. How did you redesign for this? If you could shed some light on this I would greatly appreciate it!

Thanks!

WD




 
Old July 20th, 2007, 10:44 AM
Registered User
 
Join Date: Jul 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by wdwyer
After moving the dal to it's own project, it no longer has access to globals, and therefore, no longer has access to the data provider types it needs to create an instance of the data provider.
I, too am running into the same problem. I can't add circular references. Anyone have any ideas?

Again, thanks!

--
Tara G Deschenes
Technimedia LLC
 
Old November 13th, 2007, 10:36 AM
Authorized User
 
Join Date: Nov 2007
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had the same problem when i created a test thing using the flixon generator. solved it by creating a new 'globals' class lib project and moving globals, adminbasepage and configsection classes into it. referenced that project from the bll and dal projects. worked.

 
Old November 29th, 2007, 12:29 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also in the process of separating the DAL and BLL into their own class libraries. I also created a separate class library for the Globals and ConfigSection classes. However, I get an error 'Value cannot be null.' when trying to create and instance of the storeprovider with the following code.

If IsNothing(_instance) Then
                _instance = CType(Activator.CreateInstance(Type.GetType(SiteGl obals.Globals.Settings.Store.ProviderType)), StoreProvider)
End If

When debugging the code the type 'sqlStoreProvider' is being returned but results in the above error.

Has anyone run into this problem when separating out the BLL and DAL?

Thanks in advance!






Similar Threads
Thread Thread Starter Forum Replies Last Post
BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 November 24th, 2008 03:59 PM
Help with BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 November 20th, 2008 09:23 PM
DAL to BLL rodmcleay LINQ 3 June 2nd, 2008 12:15 PM
Why not using a common detail class for DAL BLL Ghistos BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 17th, 2007 01:04 AM
Redundancy in DAL/BLL classes Mourad BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 March 8th, 2007 10:39 PM





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