title: LINQ to SQL Connection Strings with class library projects
body: <h2>LINQ to SQL Connection Strings with class library projects</h2>
  
  <blockquote>
    <p>By default, creating a new LINQ to SQL model (.dbml) will put the
    connection strings in both the application settings file and also
    web.config / app.config. This is not so much of a problem for web
    projects, but what about class library projects? i have a connection
    class where I can use it to check connection in all pages but I have an
    error where it cant read DataContext at all.</p>
    
    <p>This is a photo that shows my problem.</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/woF5y.jpg" alt="enter image description here"></p>