+ 1

C# LocalDB Connection String (App.Config)

Hi there! I make a school project, which has one solution and multiple projects inside. My data layer has a localdb, which through interfaces satisfies the storage needs of the logic layer. However, the logic must not know about how the storage is implemented, data is connected as a dll. This works fine unless one thing...! The UI project (which runs them all) MUST have the connection string defined inside its App.Config file, which kills the beautiful abstraction immediately. How can I solve this?

2nd May 2018, 11:52 PM
Magyar Dávid
Magyar Dávid - avatar
2 Antworten
+ 1
So I would expect, that Data.dll has an App.Config (it does) and if I define the connection string there, it would work with it. But instead, its seems only caring about the App.Config of the executed application/project, the UI.
2nd May 2018, 11:56 PM
Magyar Dávid
Magyar Dávid - avatar
0
Anyone has any idea?
21st Jun 2018, 10:09 AM
Magyar Dávid
Magyar Dávid - avatar