locked
Architecture problem for reusing BLL and DAL with different database connections RRS feed

  • Question

  • Hi

    I have a website using BLL and DAL. I want to add a Windows client for functionality that should not be available online. I've split the website into different projects in a solution, and that works fine. In the Windows client I want to use a local database cache to enable offline use with synchronization (to website database).

    How should I set up this so that the DAL points to the online SQL Server for the website, but to the local mdf for the Windows app? I would really like to avoid using two copies of tha BLL/DAL proejcts as they are bound to become unsynchronized. Of course, manually changing the connection string before compiling works as well, but I... well, I tend to forget and thereby breaking the website...

    Re
    Dennis
    Monday, January 11, 2010 1:41 AM

Answers

  • Hi,

     

    If change the connection string works well, why not define different connection strings for these two projects? You can save the connection strings as the project settings, and choose one according to the projects.

     

    Best regards,

    Ling Wang


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by Jing0 Monday, January 18, 2010 10:09 AM
    • Marked as answer by Jing0 Friday, January 22, 2010 2:36 AM
    Sunday, January 17, 2010 8:14 AM