roman m
roman m

Reputation: 26551

Compile .dbml file into separate assembly

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.

Upvotes: 3

Views: 1287

Answers (1)

Pedro Jacinto
Pedro Jacinto

Reputation: 1004

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.

Upvotes: 7

Related Questions