3
Answers

C# 2008 projects share a database file

Sie Ste

Sie Ste

12y
1.8k
1
For a C# 2008 desktop/console application I want to share a linq to sql (*.dbml file) between 2 different proejct files in the same solution.

I know that I should probably put the linq to sql (*.dbml file) in its own project file with a class libary?

Since I do not know how to accomplish this goal, I am wondering if you can point me to a reference on how to accomplish this goal?
Answers (3)
0
Sukesh Marla

Sukesh Marla

NA 11.8k 1.2m 12y
NO Just make sure about the namespace.
Accepted
0
Sie Ste

Sie Ste

NA 196 143.1k 12y
I looked at the link you referred to and I have a question about your statement,"Now right click both your projects and add reference and select the project just created.".
   Do you have to create any other logic for the *.dbml file access to work in the two separate project files? You I need to instantiate any objects, do I need to create any new methods?

  Can you show me any extra that is required?
0
Sukesh Marla

Sukesh Marla

NA 11.8k 1.2m 12y
I answered your question already in thread
http://www.c-sharpcorner.com/Forums/Thread/185873/C-Sharp-accessing-several-proejct-folders-in-same-solution-is.aspx 


Its

download this sample

http://www.c-sharpcorner.com/UploadFile/SukeshMarla/3-tier-architecture-using-Asp-Net/


There you can see example of class library

Let me kniw what else issue you have,


Check this is correct answer if it helped.