Callin DLL in Project B from Project A

GeneBe
GeneBe used Ask the Experts™
on
C# Project A is calling a DLL in Project B. Project B has Nuget package installed for OracleManagedDataAccess. All in does is make the oracle connection to database. Project A does the select command and puts the data in the grid. Will this work? and does Project A need the Nuget package for OracleManagedDataAccess installed as well?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Yes. Because you are running select commands from Project A, you will have to add references. If you move all the data access to Project B and simply call those functions, you will not need explicit references in Project A.
ste5anSenior Developer

Commented:
As Chinmay wrote: It will work.

But: A single library just for making a connection? This sounds not very reasonable.
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi,
If your Project B can be seen as a repository that will abstract the data access details, it makes sense to have this design. If not, maybe you can provide more details about your architecture in order to be able to help.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I have a whole bunch of applications that will be calling the Project B DLL. I has a bunch of functions already there, not just the database connection
Architect - Coder - Mentor
Commented:
Hi,
Then, it sounds like a good approach. Unfortunately, you'll have to add the references from Project B to Project A, too.

Author

Commented:
Thank you all!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial