Change MySql.Data.EntityFrameworkCore To Pomelo.EntityFrameworkCore.MySql

pull/855/head
Y2zz 6 years ago
parent 683cf3ef98
commit 0cc649d9ba

@ -16,9 +16,9 @@
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.EntityFrameworkCore\Volo.Abp.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
</ItemGroup>
</Project>

@ -1,7 +1,7 @@
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using MySql.Data.EntityFrameworkCore.Infraestructure;
using System;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Volo.Abp.EntityFrameworkCore.DependencyInjection;
namespace Volo.Abp.EntityFrameworkCore
@ -10,15 +10,15 @@ namespace Volo.Abp.EntityFrameworkCore
{
public static DbContextOptionsBuilder UseMySQL(
[NotNull] this AbpDbContextConfigurationContext context,
[CanBeNull] Action<MySQLDbContextOptionsBuilder> mySQLOptionsAction = null)
[CanBeNull] Action<MySqlDbContextOptionsBuilder> mySQLOptionsAction = null)
{
if (context.ExistingConnection != null)
{
return context.DbContextOptions.UseMySQL(context.ExistingConnection, mySQLOptionsAction);
return context.DbContextOptions.UseMySql(context.ExistingConnection, mySQLOptionsAction);
}
else
{
return context.DbContextOptions.UseMySQL(context.ConnectionString, mySQLOptionsAction);
return context.DbContextOptions.UseMySql(context.ConnectionString, mySQLOptionsAction);
}
}
}

@ -1,6 +1,6 @@
using JetBrains.Annotations;
using MySql.Data.EntityFrameworkCore.Infraestructure;
using System;
using Microsoft.EntityFrameworkCore.Infrastructure;
namespace Volo.Abp.EntityFrameworkCore
{
@ -8,7 +8,7 @@ namespace Volo.Abp.EntityFrameworkCore
{
public static void UseMySQL(
[NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<MySQLDbContextOptionsBuilder> mySQLOptionsAction = null)
[CanBeNull] Action<MySqlDbContextOptionsBuilder> mySQLOptionsAction = null)
{
options.Configure(context =>
{
@ -18,7 +18,7 @@ namespace Volo.Abp.EntityFrameworkCore
public static void UseMySQL<TDbContext>(
[NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<MySQLDbContextOptionsBuilder> mySQLOptionsAction = null)
[CanBeNull] Action<MySqlDbContextOptionsBuilder> mySQLOptionsAction = null)
where TDbContext : AbpDbContext<TDbContext>
{
options.Configure<TDbContext>(context =>

Loading…
Cancel
Save