gpt4 book ai didi

What is database name attribute in Oracle connection string for .Net 6(.Net 6的Oracle连接字符串中的数据库名称属性是什么)

转载 作者:bug小助手 更新时间:2023-10-22 18:05:07 26 4
gpt4 key购买 nike



I am using Oracle.EntityFrameWork package and with below connection string in my dbContext.

我使用的是Oracle.EntityFrameWork包,在我的dbContext中有以下连接字符串。


protected override void OnConfiguring(DbContextOptionsBuilder options){
options.UseOracle(@"Data Source=sampleip:port/serviceName;User Id=sample; Password=sample;")
}

It works but I need specify database name. I tried "Initial Catalog" but it doesn't work.

它有效,但我需要指定数据库名称。我试过“初始目录”,但它不起作用。


更多回答

You wanna specify database name in your connection string?

你想在连接字符串中指定数据库名称吗?

I am not sure if i get your point, Why don't you put the database name in {serviceName} part?

我不确定我是否理解你的观点,为什么不把数据库名称放在{serviceName}部分?

优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com