| | | 1 | | using ArturRios.Data.Relational.Core.Configuration; |
| | | 2 | | using ArturRios.Data.Relational.Core.Providers; |
| | | 3 | | using Microsoft.EntityFrameworkCore; |
| | | 4 | | |
| | | 5 | | namespace ArturRios.Data.MySql; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// <see cref="IDatabaseProvider"/> that configures EF Core to use MySQL or MariaDB via |
| | | 9 | | /// Microting.EntityFrameworkCore.MySql, a maintained fork of Pomelo.EntityFrameworkCore.MySql. |
| | | 10 | | /// </summary> |
| | | 11 | | public class MySqlProvider : IDatabaseProvider |
| | | 12 | | { |
| | | 13 | | /// <inheritdoc /> |
| | 4 | 14 | | public DatabaseType Type => DatabaseType.MySql; |
| | | 15 | | |
| | | 16 | | /// <inheritdoc /> |
| | | 17 | | public void Configure(DbContextOptionsBuilder builder, string connectionString) => |
| | 20 | 18 | | builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); |
| | | 19 | | } |