From c1e969cc3cdd619c436d6bfa281a6139451d2d00 Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Tue, 7 Apr 2020 11:38:36 +0800 Subject: [PATCH] update IsRelational extension for EntityFramework --- .../Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs index f663f43a0da..fbea680be1a 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs @@ -8,7 +8,9 @@ public static class DatabaseFacadeExtensions { public static bool IsRelational(this DatabaseFacade database) { - return database.GetInfrastructure().GetService() != null; +#pragma warning disable EF1001 // Internal EF Core API usage. + return ((IDatabaseFacadeDependenciesAccessor)database).Dependencies is IRelationalDatabaseFacadeDependencies; +#pragma warning restore EF1001 // Internal EF Core API usage. } } }