views:

388

answers:

1

I have a website project, and using Linq to SQL in it. Currently, I have my .dbml file in the App_Code directory, but I want to separate it out into a different project in order to compile it into a separate dll; is it possible?

I tried adding a DB project to my solution, but didn't have much luck with it.

+6  A: 

Yes, it is possible.

Just create a new project of type class library, and copy and paste your .dbml into the new project. Add a reference to the new project (class library) on your website project in the end.

I believe that a DB project is just a way to store SQL Scripts to be executed against a DB.

pj.az109