Presentation layer has reference to data layer

Discussion in 'ASP .Net' started by Ily, Oct 13, 2006.

  1. Ily

    Ily Guest

    Hi all

    I am using Visual studio 2005.

    Im my project I have a presentation layer, a business layer and a data
    access layer. From my business layer i have a reference to my data
    layer. I also have a refeence to my business layer from my presentation
    layer.

    Now the weird thing is, I can create a form, and I can add a using
    statement to my data layer, instantiate an object and call a method on
    it - why is this? I dont have any refernce to my data layer - so how
    does this happen? In any case - I dont want this behaviour - it didint
    work like this in Visual Studio 2003! This is obviouslay undesired
    behavior - anyone know why or how?
     
    Ily, Oct 13, 2006
    #1
    1. Advertising

  2. Maybe you need to remove the reference to your data access DLL from
    your presentation project?

    Ily wrote:
    > Hi all
    >
    > I am using Visual studio 2005.
    >
    > Im my project I have a presentation layer, a business layer and a data
    > access layer. From my business layer i have a reference to my data
    > layer. I also have a refeence to my business layer from my presentation
    > layer.
    >
    > Now the weird thing is, I can create a form, and I can add a using
    > statement to my data layer, instantiate an object and call a method on
    > it - why is this? I dont have any refernce to my data layer - so how
    > does this happen? In any case - I dont want this behaviour - it didint
    > work like this in Visual Studio 2003! This is obviouslay undesired
    > behavior - anyone know why or how?
     
    Chris Fulstow, Oct 13, 2006
    #2
    1. Advertising

  3. If you use Web Site project type, then all the references AND THEIR
    REFERENCES are copied into /bin/ folder. And because WebSite does not have
    any .csproj file, where the refereces would be explicitly listed, it
    automatically references all assemblies in /bin folder.

    You have to use Web Application Project if you want the old (IMHO better)
    project style.

    Robert Haken [MVP ASP/ASP.NET]
    HAVIT, s.r.o., www.havit.cz
    http://knowledge-base.havit.cz


    "Ily" <> píse v diskusním príspevku
    news:...
    > Hi all
    >
    > I am using Visual studio 2005.
    >
    > Im my project I have a presentation layer, a business layer and a data
    > access layer. From my business layer i have a reference to my data
    > layer. I also have a refeence to my business layer from my presentation
    > layer.
    >
    > Now the weird thing is, I can create a form, and I can add a using
    > statement to my data layer, instantiate an object and call a method on
    > it - why is this? I dont have any refernce to my data layer - so how
    > does this happen? In any case - I dont want this behaviour - it didint
    > work like this in Visual Studio 2003! This is obviouslay undesired
    > behavior - anyone know why or how?
    >
     
    Robert Haken [MVP], Oct 13, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learner
    Replies:
    5
    Views:
    657
    Karl Seguin
    Dec 21, 2005
  2. dan
    Replies:
    25
    Views:
    1,376
    Uncle Bob (Robert C. Martin)
    Oct 28, 2003
  3. Universe
    Replies:
    1
    Views:
    493
    Universe
    Oct 24, 2003
  4. 2BaCook
    Replies:
    3
    Views:
    470
    Reinhold Erler
    Nov 11, 2003
  5. Dhananjay
    Replies:
    1
    Views:
    1,201
    sloan
    Dec 18, 2006
Loading...

Share This Page