I have a project of type class library where I have my Context, in it I get the SQL connection that is in my web.config
.
How can I add the SQL connection so that it stays inside the DLL? I want to pass the direct connection here, without having to use web.config:
ConfigurationManager.ConnectionStrings["Conexao"].ConnectionString
I have this:
public Contexto()
{
minhaConexao = new SqlConnection(ConfigurationManager.ConnectionStrings["Conexao"].ConnectionString);
minhaConexao.Open();
}