Skip to content

Commit

Permalink
Merge pull request #855 from Y2zz/master
Browse files Browse the repository at this point in the history
use Pomelo.EntityFrameworkCore.MySql
  • Loading branch information
hikalkan committed Mar 4, 2019
2 parents fcb90ff + 0cc649d commit 6871371
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -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
Expand All @@ -10,15 +10,15 @@ public static class AbpDbContextConfigurationContextMySQLExtensions
{
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);
}
}
}
Expand Down
@@ -1,14 +1,14 @@
using JetBrains.Annotations;
using MySql.Data.EntityFrameworkCore.Infraestructure;
using System;
using Microsoft.EntityFrameworkCore.Infrastructure;

namespace Volo.Abp.EntityFrameworkCore
{
public static class AbpDbContextOptionsMySQLExtensions
{
public static void UseMySQL(
[NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<MySQLDbContextOptionsBuilder> mySQLOptionsAction = null)
[CanBeNull] Action<MySqlDbContextOptionsBuilder> mySQLOptionsAction = null)
{
options.Configure(context =>
{
Expand All @@ -18,7 +18,7 @@ public static class AbpDbContextOptionsMySQLExtensions

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 =>
Expand Down

0 comments on commit 6871371

Please sign in to comment.