public MensagemDAO() { StringConexaoDB stringConexaoDB = new StringConexaoDB(); //conexao = new SqlConnection(stringConexao); conexao = new SqlConnection(stringConexaoDB.PathConexaoDB()); }
public UsuarioDAO() { //string stringConexao = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\aulasCSharp\Udemy\Aula02\WebApp\WebApp\App_Data\Database.mdf;Integrated Security=True"; //string stringConexao = @"Data Source = (localdb)\MSSQLLocalDB; Database = DBWattsAppApi; User ID = sa; Password = senha; TrustServerCertificate = True; Trusted_Connection = False; Connection Timeout = 300; Integrated Security = False; Persist Security Info = False; Encrypt = false; MultipleActiveResultSets = True;"; //return; StringConexaoDB stringConexaoBd = new StringConexaoDB(); //conexao = new SqlConnection(stringConexao); conexao = new SqlConnection(stringConexaoBd.PathConexaoDB()); conexao.Open(); }