how do I get the connection string from app.config in another "class library project"
in the same class library I can use this code :
DAL.Properties.Settings.Default.BayrueConnectionString;
but the issue is that I cannot get it from my web app.
thanks

I think there is no more elegant way than this. Add a static helper method to your class library which returns it.
public sealed class Helper
{
private Helper()
{
}
public static string GetBayrueConnectionString()
{
return DAL.Properties.Settings.Default.BayrueConnectionString;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With