Browse Source

Fix the unit tests.

pull/6815/head
maliming 6 years ago
parent
commit
c4a36cac9e
  1. 4
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs
  2. 2
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

4
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs

@ -1,4 +1,4 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -33,7 +33,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore
public virtual IGuidGenerator GuidGenerator => LazyServiceProvider.LazyGetService<IGuidGenerator>(SimpleGuidGenerator.Instance); public virtual IGuidGenerator GuidGenerator => LazyServiceProvider.LazyGetService<IGuidGenerator>(SimpleGuidGenerator.Instance);
public IEfCoreBulkOperationProvider BulkOperationProvider => LazyServiceProvider.LazyGetRequiredService<IEfCoreBulkOperationProvider>(); public IEfCoreBulkOperationProvider BulkOperationProvider => LazyServiceProvider.LazyGetService<IEfCoreBulkOperationProvider>();
public EfCoreRepository(IDbContextProvider<TDbContext> dbContextProvider) public EfCoreRepository(IDbContextProvider<TDbContext> dbContextProvider)
{ {

2
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -562,7 +562,7 @@ namespace Volo.Abp.EntityFrameworkCore
!typeof(TEntity).IsDefined(typeof(OwnedAttribute), true) && !typeof(TEntity).IsDefined(typeof(OwnedAttribute), true) &&
!mutableEntityType.IsOwned()) !mutableEntityType.IsOwned())
{ {
if (Clock == null || !Clock.SupportsMultipleTimezone) if (LazyServiceProvider == null || Clock == null || !Clock.SupportsMultipleTimezone)
{ {
return; return;
} }

Loading…
Cancel
Save