【发布时间】:2021-12-18 13:44:31
【问题描述】:
我已经使用 docker 容器在我的 OS X 中安装了一个 Linux SQL Server 实例,并且我已经使用 VS Code 连接到这个 localhost 实例
但我需要在 VS for Mac 中连接到它来开发我的 EF Core 项目,我不知道这是否可能,因为当我在我的 DbContext 中尝试这个时
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer("Data Source=localhost;Initial Catalog=Boletus;Integrated Security=True")
.LogTo(Console.WriteLine, new[] { DbLoggerCategory.Database.Command.Name }, LogLevel.Information)
.EnableSensitiveDataLogging();
}
我得到了这个异常
有什么想法吗?
谢谢
【问题讨论】:
标签: entity-framework-core entity-framework-core-5 entity-framework-core-5.0