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

Database target entity framework connection string #2510

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Jan 14, 2018

Embedded the code from #2308 directly into DatabaseTarget. Resolves #98

Since "provider" is a common keyword in the connectionstring, and no one have requested NLog to parse it, then I have decided to only parse it when the connectionstring seems to come from entity framework.

@snakefoot snakefoot force-pushed the DatabaseTargetEntityFramework branch from bbf200e to 48a35a7 Compare January 14, 2018 20:27
@snakefoot snakefoot changed the title Database target entity framework Database target entity framework connection string Jan 14, 2018
@codecov
Copy link

codecov bot commented Jan 14, 2018

Codecov Report

Merging #2510 into master will decrease coverage by <1%.
The diff coverage is 96%.

@@           Coverage Diff           @@
##           master   #2510    +/-   ##
=======================================
- Coverage      82%     82%   -<1%     
=======================================
  Files         323     323            
  Lines       23352   23375    +23     
  Branches     2916    2920     +4     
=======================================
+ Hits        19037   19051    +14     
- Misses       3546    3554     +8     
- Partials      769     770     +1

@snakefoot snakefoot force-pushed the DatabaseTargetEntityFramework branch from 48a35a7 to c129534 Compare January 14, 2018 22:29

databaseTarget.Initialize(null);
Assert.NotNull(databaseTarget.ProviderFactory);
Assert.Equal(typeof(SqlClientFactory), databaseTarget.ProviderFactory.GetType());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add an assert here for the connectionstring?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@304NotModified 304NotModified added this to the 4.5 rc4 milestone Jan 14, 2018
@snakefoot snakefoot force-pushed the DatabaseTargetEntityFramework branch from c129534 to b8e8a5f Compare January 14, 2018 22:45
@304NotModified
Copy link
Member

thx!

@304NotModified 304NotModified merged commit 63a7445 into NLog:master Jan 15, 2018
@snakefoot snakefoot mentioned this pull request Feb 6, 2018
@snakefoot snakefoot modified the milestones: 4.5 rc4, 4.5 Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants