I'm facing an "annoying" problem... Any project that I start in Visual Studio or VSCode and try to connect to the SQL Server database running via Docker, the error below occurs:
Even pointing to the context file, the connection always tries to the user in the print above
public class ApplicationContext : DbContext
{
public DbSet<Cliente> Clientes { get; set; }
public DbSet<Pedido> Pedidos { get; set; }
public DbSet<PedidoItem> PedidoItems { get; set; }
public DbSet<Produto> Produtos { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer("Server=localhost,1433;Database=DbPedidos;User Id=sa;Password=1q2w3e4r@#$;Trusted_Connection=True;Integrated Security=True");
}
What can it be?
I've done everything as described above, I've uninstalled SQL Server LocalDb 2019 from the machine, I've deleted the local database file and several other things, but nothing works.