Fernando Bernal
Fernando Bernal

Reputation: 99

Access to the project classes from library project C#

I have the following question.

I am currently working on a C # project and need to create some library projects, but at the time of creating these projects I was presented with the following scenario: I need access to the classes in the main project from within the library projects Since my data base access layer is in the main project, I'm looking for a way so that I don't have to add this into every library project.

Really only needed to execute SELECT statements. I use ADO.NET to execute all transactions over the data base.

Any help will be really useful.

Thanks for your time.

Upvotes: 0

Views: 303

Answers (1)

Habib
Habib

Reputation: 223217

It is not a good idea to reference the executable/main project in the library project. It should be vice versa.

The Library project should be independent of the application's platform. What you should do is to extract the data access code in another library project. That way you will be able to access it in other libraries/projects.

Upvotes: 4

Related Questions