Skip to content

Commit 08f5a25

Browse files
fix clone connection
1 parent 6350ce0 commit 08f5a25

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

examples/src/EF/EF.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,4 @@
1111
<ItemGroup>
1212
<ProjectReference Include="..\..\..\src\EfCore.Ydb\src\EfCore.Ydb.csproj" />
1313
</ItemGroup>
14-
15-
<ItemGroup>
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
17-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18-
<PrivateAssets>all</PrivateAssets>
19-
</PackageReference>
20-
</ItemGroup>
21-
2214
</Project>

src/EfCore.Ydb/src/Storage/Internal/YdbRelationalConnection.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ protected override DbConnection CreateDbConnection()
3636

3737
public IYdbRelationalConnection Clone()
3838
{
39-
var connectionStringBuilder = new YdbConnectionStringBuilder(GetValidatedConnectionString());
40-
var options = new DbContextOptionsBuilder().UseYdb(connectionStringBuilder.ToString()).Options;
39+
var options = new DbContextOptionsBuilder().UseYdb(GetValidatedConnectionString(), builder =>
40+
{
41+
builder.WithCredentialsProvider(_credentialsProvider);
42+
builder.WithServerCertificates(_serverCertificates);
43+
}).Options;
44+
4145
return new YdbRelationalConnection(Dependencies with { ContextOptions = options });
4246
}
4347
}

src/Ydb.Sdk/src/Ado/YdbConnectionStringBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ private abstract class YdbConnectionOption
275275
return value switch
276276
{
277277
bool boolValue => boolValue,
278-
string strValue => strValue switch
278+
string strValue => strValue.ToLowerInvariant() switch
279279
{
280280
"on" or "true" or "1" => true,
281281
"off" or "false" or "0" => false,

0 commit comments

Comments
 (0)