I am working on NLog with Pomelo.EntityFrameworkCore.MySql, Based on the document, I know Pomelo based on MySqlConnector, but I don't know what's the value of dbProvider of the target in file nlog.config.
Asked
Active
Viewed 658 times
1

lauxjpn
- 4,749
- 1
- 20
- 40

SheldonLou
- 169
- 1
- 11
1 Answers
4
NLog DatabaseTarget requires an ADO-provider. After checking MySqlConnector.dll using .Net Refactor, then it should be like this:
dbProvider="MySql.Data.MySqlClient.MySqlConnection,MySqlConnector"
Notice Pomelo.EntityFrameworkCore is an EF Core provider (That underneath uses the ADO-provider)

Rolf Kristensen
- 17,785
- 1
- 51
- 70

SheldonLou
- 169
- 1
- 11
-
See also the example in the docs: https://github.com/NLog/NLog/wiki/Database-Target#mysql-and-net-core – Julian Jun 12 '17 at 13:43