Hello :)
For example.
Startup project: I configure and create Owin App.
Core project: This project is core. In this project, all the magic happens.
But! I want to configure DB connection for Core project in Startup project and have these settings in classes of a Core project project.
I believe that it should be done like this:
class Strartup
{
public void Configuration(IAppBuilder app)
{
app.Properties.Add("ConnectionString", "SomeString");
}
}
class SomeClass
{
// And getting this string in the other classes
public void SomeMethod()
{
string connectionString = SomeObject.GetContext().Properties.Get("ConnectionString");
}
}
FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.
Boost your productivity with FavScripts.com!