Compile the .dbml file into a separate assembly

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

I tried to add a database project to my solution, but it was out of luck.

+3
source share
1 answer

Yes it is possible.

Just create a new project such as a class library and copy and paste your .dbml into a new project. Add a link to the new project (class library) in your web project at the end.

, - SQL-, .

+7

Source: https://habr.com/ru/post/1705495/


All Articles