using System.Data.SqlClient;
namespace ScreenSound.Banco;
internal class Connection
{
private string connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=ScreenSound;Integrated Security=True;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False";
public SqlConnection ObterConexao()
{
return new SqlConnection(connectionString);
}
}
Quando cliquei no console para executar veio a seguinte mensagem:
"Keyword not supported: 'trust server certificate'."