Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheConnectionStringProperties is called twice when initializing SqlConnection. #680

Closed
TrayanZapryanov opened this issue Aug 9, 2020 · 3 comments · Fixed by #683
Closed
Labels
📈 Performance Use this label for performance improvement activities

Comments

@TrayanZapryanov
Copy link
Contributor

When calling any constructor of SqlConnection - there is an explicit call of CacheConnectionStringProperties.
This looks redundant as both ctor's are setting property ConnectionString and there is a call in it's set method.
I hope that I've read correctly the code, if not please excuse me and close the issue.

@JRahnama
Copy link
Member

JRahnama commented Aug 9, 2020

@TrayanZapryanov by saying any constructor you mean I can see the issue on new SqlConnection(sourceString.ConnectionString) for example?
If the answer is no, can you kindly provide the repro/cpde sample that you were looking at while facing the issue?

And second is it happening at netcore or dotnet framework?

@JRahnama JRahnama added the ⏳ Waiting for Customer We're waiting for your response :) label Aug 9, 2020
@JRahnama JRahnama removed the ⏳ Waiting for Customer We're waiting for your response :) label Aug 10, 2020
@karinazhou
Copy link
Member

Hi @TrayanZapryanov ,

Thank you for pointing this out. I agree that there are additional calls of CacheConnectionStringProperties in some SqlConnection constructors after setting ConnectionString property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 Performance Use this label for performance improvement activities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants