From f66ca10231c0f45b214c0b8e6dbebb43d8419069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 25 Jan 2018 09:28:46 +0300 Subject: [PATCH] Temporary remove default PK entity, repository, agg root etc. --- .../AbpDesk/ConsoleDemo/BlogPostLister.cs | 4 +- .../AbpDesk/ConsoleDemo/UserLister.cs | 4 +- .../Blogging/AbpDeskMongoBlogModule.cs | 5 +- .../Areas/Blog/Controllers/PostsController.cs | 7 +- src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll | Bin 15360 -> 15360 bytes .../ServiceCollectionRepositoryExtensions.cs | 50 +++++++-------- .../Services/CrudAppServiceBase.cs | 1 - .../Services/IAsyncCrudAppService.cs | 8 --- .../CommonDbContextRegistrationOptions.cs | 8 +-- ...mmonDbContextRegistrationOptionsBuilder.cs | 3 +- .../Volo/Abp/Domain/Entities/AggregateRoot.cs | 6 +- .../Volo/Abp/Domain/Entities/Entity.cs | 12 ++-- .../Abp/Domain/Entities/IAggregateRoot.cs | 6 +- .../Volo/Abp/Domain/Entities/IEntity.cs | 12 ++-- .../Repositories/IQueryableRepository.cs | 8 +-- .../Abp/Domain/Repositories/IRepository.cs | 8 +-- .../Repositories/QueryableRepositoryBase.cs | 8 +-- .../Abp/Domain/Repositories/RepositoryBase.cs | 8 +-- .../Repositories/RepositoryRegistrarBase.cs | 18 +++--- .../EntityFrameworkCore/EfCoreRepository.cs | 18 +++--- .../EntityFrameworkCore/IEfCoreRepository.cs | 8 +-- .../EfCoreRepositoryRegistrar.cs | 8 +-- .../MemoryDb/IMemoryDbRepository.cs | 8 +-- .../MemoryDb/MemoryDbRepository.cs | 18 +++--- .../MemoryDbRepositoryRegistrar.cs | 5 -- .../MongoDB/IMongoDbRepository.cs | 8 +-- .../Repositories/MongoDB/MongoDbRepository.cs | 18 +++--- .../MongoDbRepositoryRegistrar.cs | 5 -- .../AspNetCore/Mvc/PersonAppService_Tests.cs | 4 +- .../RepositoryRegistration_Tests.cs | 60 ++++++++---------- .../Volo/Abp/Identity/Initialize_Tests.cs | 4 +- .../MemoryDb_SoftDelete_DataFilter_Tests.cs | 7 +- .../MemoryDb_Basic_Repository_Tests.cs | 4 +- .../TestApp/Application/IPeopleAppService.cs | 2 +- .../TestApp/Application/PeopleAppService.cs | 2 +- 35 files changed, 166 insertions(+), 189 deletions(-) diff --git a/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/BlogPostLister.cs b/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/BlogPostLister.cs index 5d664d7a0d..c0bf2e9556 100644 --- a/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/BlogPostLister.cs +++ b/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/BlogPostLister.cs @@ -9,11 +9,11 @@ namespace AbpDesk.ConsoleDemo { public class BlogPostLister : ITransientDependency { - private readonly IQueryableRepository _blogPostRepository; + private readonly IQueryableRepository _blogPostRepository; private readonly IGuidGenerator _guidGenerator; public BlogPostLister( - IQueryableRepository blogPostRepository, + IQueryableRepository blogPostRepository, IGuidGenerator guidGenerator) { _blogPostRepository = blogPostRepository; diff --git a/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/UserLister.cs b/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/UserLister.cs index 51a5a8f1e0..46b038c511 100644 --- a/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/UserLister.cs +++ b/src/AbpDesk/AbpDesk.ConsoleDemo/AbpDesk/ConsoleDemo/UserLister.cs @@ -11,11 +11,11 @@ namespace AbpDesk.ConsoleDemo public class UserLister : ITransientDependency { private readonly IdentityUserManager _userManager; - private readonly IQueryableRepository _userRepository; + private readonly IQueryableRepository _userRepository; public UserLister( IdentityUserManager userManager, - IQueryableRepository userRepository) + IQueryableRepository userRepository) { _userManager = userManager; _userRepository = userRepository; diff --git a/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs b/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs index 8e5df159d1..90e0b6b1cc 100644 --- a/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs +++ b/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Volo.Abp; @@ -46,7 +47,7 @@ namespace AbpDesk.Blogging using (var uow = scope.ServiceProvider.GetRequiredService().Begin()) { - var blogPostRepository = scope.ServiceProvider.GetRequiredService>(); + var blogPostRepository = scope.ServiceProvider.GetRequiredService>(); if (blogPostRepository.Any()) { logger.LogInformation($"No need to seed database since there are already {blogPostRepository.Count()} blog posts!"); diff --git a/src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Controllers/PostsController.cs b/src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Controllers/PostsController.cs index 64e0dcf640..ec761ebfe4 100644 --- a/src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Controllers/PostsController.cs +++ b/src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Controllers/PostsController.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using AbpDesk.Blogging; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; @@ -9,9 +10,9 @@ namespace Areas.Blog.Controllers [Area("Blog")] public class PostsController : AbpController { - private readonly IQueryableRepository _blogPostRepository; + private readonly IQueryableRepository _blogPostRepository; - public PostsController(IQueryableRepository blogPostRepository) + public PostsController(IQueryableRepository blogPostRepository) { _blogPostRepository = blogPostRepository; } diff --git a/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll b/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll index a6bb0c90e4f934c925e089b4398fc610bba4a6ab..e18ffa8870111b6acf25bcd5eff6e366b5f589de 100644 GIT binary patch delta 2142 zcmY*aYitx%6#mYg*_qwh?sR9iqs4BQDHU1@)YgKa@+bjP3#ourkPxh-8f*$Cq*O%{ zcUFkO2hnP@sfvh+KYS%%G}5Rsh>4&vzQuFz7LAkLZ@%;0^SJli zJ2TN;(Or-3FrOUG{W|b)mhKzax0)`KM0K(4D}gz3^UUdT4b{;OS)e?1OA;A>%cTIJ zbiKF~IAO6{Lve+8L{L-llo=Y7lN5h~K9NK5uN;rwb1dYU{wahIHn4d8|m-vElUGf{& z+i;rkPmP^8C$2y}{Ut8CmZw9;MYt46V@0T1aDS!c1P0-jl7&NVjUn)&w%$dT)4*1$ zMtQ!A8S!SrK&7?@a6QeD)5@x<7Z@>oJV|+|Toz*ZTw4Q`WzJIBUAAP}wT6v`TIKOh zVmNgpTP@n!uKnX^)s~9xmLHd`FYh&6*t|)~KbP1d7o}#?z4D&a5?U%pQ&r^;83CqD zQRCY%1CPlwsRwA2?00X-55saU!9GR{$2Fcrqif+LzB5AnrWKDYX9_kmrZLPo3k9ub z(Pyqg7BRPr@qT+Fcgb?@#Q~b_ZpU=ZN9j8ASsbS?t%I0K^Ag|VBn9S=j30?V_#m{G zCzm&CokV4PDka2E?tI4cspV87MpA33o%+lTG!sep4qA+3w38OnQ>KMx(aSi2=VM{3 z#v#lwo~DA_Q{F)z%5&vy)FZD<*W_O@8j-;P#wwg(ti>4PG>t9zmig71FVeUSf3wnw zdb1I0(Z$$}jf}nQ*@}B`r`gI~eA!%tJ{&f?@dA#S1w6z`0SED#xeY}ej16mLSSfjP zR2!pucuey#&A-x|NCgwAU_iRT%A7DMuY*PWP)<><#Q zY%EUpm(c28Md=-J%m&WJN_g0bL)>AL`(@rcCyKq#FX15!j| zhY0*Ntj0O;CGw+JW1*mIrI#k*M+5x3pey$@d*!v;Nc#T{ImCE88cC#iZaPl+m(|#| z9}RJe-E8>LaNsWyeudZWM|(x!Mf)fg3*kqn}HUWd= z&vjmU*pL1aj&dpGlNI&#H|{kZk9Jvm+=fAX8m?Xb2 zFROQct6VU3c|O52E3I8vZp^CYb;McHE40T~EUdVq>JS)~uehFOlC=xDSr1jJ(%%2e zMv~m53kAl{2%jVtd2`i`BObS)%*P#dgi4*1xrPbLZ2m-g?XIhrs2ZP8{(1|_LX%wA zEg7Y3ua<5jMm^j_y~?EaD9(%{irX3{i;MXS1^jUE&Hlcg+c$)rTl==$y6NhaQ+#>) zHI$ehw)OYiGC%B+1C4}w+subR7>9_&o+3;*b9!S!k(E z|2=!c*vd!jMT2W@sJru=aZ0|{(v@0$o%(o`uFW!>Sw-E&xij}u(Y@k#Lu|ji=w0;# I4K&&R0PQHgMgRZ+ delta 2132 zcmY*a3v3is6g~IN?9A@8JKde_k}BI}m(udDV9QS=mLM&aAe29%fm*9H;HQ+TNaD__ zX*5c3^8$)m(~1xYl2|vQhXI_{{jjpsW+a9izuQ{D1k3qoTnIdR(huZt)w4%z4%@enx2*Y5cBWTf96vL6m z@9sXa)IVq(5)%KBA-#UaL5G;R|E%ol0irqLJ2S*c)dA!nXo+!gwQ@s^@4ww-qeB<(3-)FKg>vta7T@3a6Fl zyBHrFZx|@kRt}4)R*o$mT0Y$f;M3vCL*=p%z$tCz%8H$O*-|`v>_OThwx+6COh3FneDKgE78knpj1lxQPDWPi33Qmt zkwCz0X6&->;x1W^kNq^o?ZPmbrJBlIIqQr!H7@e^?gXJuna(frX` zCs7t0O(Ai?y_WHEcpjz2YvC0%lRC^+szs4|FI|rT+Dy~vIn%;Kv6eB)^;l@vn8SGE zdDEUYL?R?>C9fE8Zqo+9E#5vD{z`|ti~FA#eBNvvoy}dB~})p(yYcx z+|1a5HpaE=S%*#7VAgRLUp8l<18niJ-=7PqyA0`1XA$)?}Ff%t%`7TQYj&a z27{~!p*#u0p+pD<$%`YSZnx+EC4$ODWs^fjjk>9qGpS|Ay=+`~rA+OVi1FzVynHp2 z&G|kfuS~Ts2FF(U`+3@fHc#Fd&6ZodZm-eh5=0V7xICk4#l3d9ZPc)gD%IuphA>l{ zGXQeS-IyH+dMo15J2_RmT2;d9RO`u3RJCL$m85uJi5`q8n`qolIw7L{!446ipa~(Na&sKl-G@(pRu_zwRT~-0jr!>5oAHHk4N-+g%wm(JphK~ zDXxnwV(p*ItfxXMPVf7_tS`hZDx@ELI`|o4iMO?I%UR7(X3kL$Poax^eki0()nrF! z(DelQ8_K)kx_ZrOCv@Ta~ - var repositoryInterfaceWithDefaultPrimaryKey = typeof(IRepository<>).MakeGenericType(entityType); - if (!repositoryInterfaceWithDefaultPrimaryKey.GetTypeInfo().IsAssignableFrom(repositoryImplementationType)) - { - throw new AbpException($"Given repositoryImplementationType ({repositoryImplementationType}) must implement {repositoryInterfaceWithDefaultPrimaryKey}"); - } + //private static void AddDefaultRepositoryForDefaultPrimaryKey(IServiceCollection services, Type entityType, Type repositoryImplementationType) + //{ + // //IRepository + // var repositoryInterfaceWithDefaultPrimaryKey = typeof(IRepository<>).MakeGenericType(entityType); + // if (!repositoryInterfaceWithDefaultPrimaryKey.GetTypeInfo().IsAssignableFrom(repositoryImplementationType)) + // { + // throw new AbpException($"Given repositoryImplementationType ({repositoryImplementationType}) must implement {repositoryInterfaceWithDefaultPrimaryKey}"); + // } - services.TryAddTransient(repositoryInterfaceWithDefaultPrimaryKey, repositoryImplementationType); + // services.TryAddTransient(repositoryInterfaceWithDefaultPrimaryKey, repositoryImplementationType); - //IQueryableRepository - var queryableRepositoryInterfaceWithDefaultPrimaryKey = typeof(IQueryableRepository<>).MakeGenericType(entityType); - if (queryableRepositoryInterfaceWithDefaultPrimaryKey.GetTypeInfo().IsAssignableFrom(repositoryImplementationType)) - { - services.TryAddTransient(queryableRepositoryInterfaceWithDefaultPrimaryKey, repositoryImplementationType); - } - } + // //IQueryableRepository + // var queryableRepositoryInterfaceWithDefaultPrimaryKey = typeof(IQueryableRepository<>).MakeGenericType(entityType); + // if (queryableRepositoryInterfaceWithDefaultPrimaryKey.GetTypeInfo().IsAssignableFrom(repositoryImplementationType)) + // { + // services.TryAddTransient(queryableRepositoryInterfaceWithDefaultPrimaryKey, repositoryImplementationType); + // } + //} - private static bool BothSupportsDefaultPrimaryKey(Type entityType, Type repositoryImplementationType) - { - return typeof(IEntity).GetTypeInfo().IsAssignableFrom(entityType) && - ReflectionHelper.IsAssignableToGenericType(repositoryImplementationType, typeof(IRepository<>)); - } + //private static bool BothSupportsDefaultPrimaryKey(Type entityType, Type repositoryImplementationType) + //{ + // return typeof(IEntity).GetTypeInfo().IsAssignableFrom(entityType) && + // ReflectionHelper.IsAssignableToGenericType(repositoryImplementationType, typeof(IRepository<>)); + //} } } \ No newline at end of file diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/CrudAppServiceBase.cs b/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/CrudAppServiceBase.cs index 3cdff642f1..ec04a532ab 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/CrudAppServiceBase.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/CrudAppServiceBase.cs @@ -4,7 +4,6 @@ using System.Linq.Dynamic.Core; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; -using Volo.Abp.ObjectMapping; namespace Volo.Abp.Application.Services { diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/IAsyncCrudAppService.cs b/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/IAsyncCrudAppService.cs index a94d0ce554..37c8293df4 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/IAsyncCrudAppService.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Application/Services/IAsyncCrudAppService.cs @@ -1,16 +1,8 @@ -using System; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; namespace Volo.Abp.Application.Services { - public interface IAsyncCrudAppService - : IAsyncCrudAppService - where TEntityDto : IEntityDto - { - - } - public interface IAsyncCrudAppService : IAsyncCrudAppService where TEntityDto : IEntityDto diff --git a/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs b/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs index 99f087c54d..cced597bd4 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.DependencyInjection public Type DefaultRepositoryImplementationType { get; private set; } - public Type DefaultRepositoryImplementationTypeWithDefaultPrimaryKey { get; private set; } + //public Type DefaultRepositoryImplementationTypeWithDefaultPrimaryKey { get; private set; } public bool RegisterDefaultRepositories { get; private set; } @@ -28,7 +28,7 @@ namespace Volo.Abp.DependencyInjection public Dictionary CustomRepositories { get; } - public bool SpecifiedDefaultRepositoryTypes => DefaultRepositoryImplementationType != null && DefaultRepositoryImplementationTypeWithDefaultPrimaryKey != null; + public bool SpecifiedDefaultRepositoryTypes => DefaultRepositoryImplementationType != null; // && DefaultRepositoryImplementationTypeWithDefaultPrimaryKey != null; protected CommonDbContextRegistrationOptions(Type originalDbContextType) { @@ -87,13 +87,11 @@ namespace Volo.Abp.DependencyInjection return this; } - public ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses([NotNull] Type repositoryImplementationType, [NotNull] Type repositoryImplementationTypeWithDefaultPrimaryKey) + public ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses([NotNull] Type repositoryImplementationType) { Check.NotNull(repositoryImplementationType, nameof(repositoryImplementationType)); - Check.NotNull(repositoryImplementationTypeWithDefaultPrimaryKey, nameof(repositoryImplementationTypeWithDefaultPrimaryKey)); DefaultRepositoryImplementationType = repositoryImplementationType; - DefaultRepositoryImplementationTypeWithDefaultPrimaryKey = repositoryImplementationTypeWithDefaultPrimaryKey; return this; } diff --git a/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs b/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs index f15509dfbe..b78c2d7e67 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs @@ -47,9 +47,8 @@ namespace Volo.Abp.DependencyInjection /// Uses given class(es) for default repositories. /// /// Repository implementation type - /// Repository implementation type for default primary key type () /// - ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses(Type repositoryImplementationType, Type repositoryImplementationTypeWithDefaultPrimaryKey); + ICommonDbContextRegistrationOptionsBuilder SetDefaultRepositoryClasses(Type repositoryImplementationType); /// /// Replaces given DbContext type with this DbContext type. diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/AggregateRoot.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/AggregateRoot.cs index 3c8d2771f5..58940bc7af 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/AggregateRoot.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/AggregateRoot.cs @@ -2,10 +2,10 @@ namespace Volo.Abp.Domain.Entities { - public abstract class AggregateRoot : AggregateRoot, IAggregateRoot - { + //public abstract class AggregateRoot : AggregateRoot, IAggregateRoot + //{ - } + //} public abstract class AggregateRoot : Entity, IAggregateRoot { diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Entity.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Entity.cs index 7b09c60baa..6cc3303565 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Entity.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Entity.cs @@ -3,13 +3,13 @@ using System.Reflection; namespace Volo.Abp.Domain.Entities { - /// - /// A shortcut of for default primary key type (). - /// - public abstract class Entity : Entity, IEntity - { + ///// + ///// A shortcut of for default primary key type (). + ///// + //public abstract class Entity : Entity, IEntity + //{ - } + //} /// /// diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IAggregateRoot.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IAggregateRoot.cs index 9ef287eb68..adb3f11d60 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IAggregateRoot.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IAggregateRoot.cs @@ -2,10 +2,10 @@ namespace Volo.Abp.Domain.Entities { - public interface IAggregateRoot : IAggregateRoot, IEntity - { + //public interface IAggregateRoot : IAggregateRoot, IEntity + //{ - } + //} public interface IAggregateRoot : IEntity { diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IEntity.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IEntity.cs index 9534c6c38d..ff798a8253 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IEntity.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IEntity.cs @@ -2,13 +2,13 @@ namespace Volo.Abp.Domain.Entities { - /// - /// A shortcut of for default primary key type (). - /// - public interface IEntity : IEntity - { + ///// + ///// A shortcut of for default primary key type (). + ///// + //public interface IEntity : IEntity + //{ - } + //} /// /// Defines interface for base entity type. All entities in the system must implement this interface. diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IQueryableRepository.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IQueryableRepository.cs index 53e65ce336..08bb61a442 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IQueryableRepository.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IQueryableRepository.cs @@ -8,11 +8,11 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories { - public interface IQueryableRepository : IQueryableRepository, IRepository - where TEntity : class, IEntity - { + //public interface IQueryableRepository : IQueryableRepository, IRepository + // where TEntity : class, IEntity + //{ - } + //} public interface IQueryableRepository : IRepository, IQueryable where TEntity : class, IEntity diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IRepository.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IRepository.cs index 2af29b9cbc..f2bc729011 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IRepository.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IRepository.cs @@ -13,11 +13,11 @@ namespace Volo.Abp.Domain.Repositories } - public interface IRepository : IRepository - where TEntity : class, IEntity - { + //public interface IRepository : IRepository + // where TEntity : class, IEntity + //{ - } + //} public interface IRepository : IRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/QueryableRepositoryBase.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/QueryableRepositoryBase.cs index d75d4b8f13..8bdc50b4b3 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/QueryableRepositoryBase.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/QueryableRepositoryBase.cs @@ -11,11 +11,11 @@ using Volo.Abp.MultiTenancy; namespace Volo.Abp.Domain.Repositories { - public abstract class QueryableRepositoryBase : QueryableRepositoryBase, IQueryableRepository - where TEntity : class, IEntity - { + //public abstract class QueryableRepositoryBase : QueryableRepositoryBase, IQueryableRepository + // where TEntity : class, IEntity + //{ - } + //} public abstract class QueryableRepositoryBase : RepositoryBase, IQueryableRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryBase.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryBase.cs index 062d130ad0..a1c890c600 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryBase.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryBase.cs @@ -8,11 +8,11 @@ using Volo.Abp.Threading; namespace Volo.Abp.Domain.Repositories { - public abstract class RepositoryBase : RepositoryBase, IRepository - where TEntity : class, IEntity - { + //public abstract class RepositoryBase : RepositoryBase, IRepository + // where TEntity : class, IEntity + //{ - } + //} public abstract class RepositoryBase : IRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs index ea3e1963f8..544da02f10 100644 --- a/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs +++ b/src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs @@ -46,20 +46,22 @@ namespace Volo.Abp.Domain.Repositories protected void RegisterDefaultRepository(IServiceCollection services, Type entityType) { var primaryKeyType = EntityHelper.GetPrimaryKeyType(entityType); - var isDefaultPrimaryKey = primaryKeyType == typeof(Guid); + //var isDefaultPrimaryKey = primaryKeyType == typeof(Guid); Type repositoryImplementationType; if (Options.SpecifiedDefaultRepositoryTypes) { - repositoryImplementationType = isDefaultPrimaryKey - ? Options.DefaultRepositoryImplementationTypeWithDefaultPrimaryKey.MakeGenericType(entityType) - : Options.DefaultRepositoryImplementationType.MakeGenericType(entityType, primaryKeyType); + repositoryImplementationType = Options.DefaultRepositoryImplementationType.MakeGenericType(entityType, primaryKeyType); + //repositoryImplementationType = isDefaultPrimaryKey + // ? Options.DefaultRepositoryImplementationTypeWithDefaultPrimaryKey.MakeGenericType(entityType) + // : Options.DefaultRepositoryImplementationType.MakeGenericType(entityType, primaryKeyType); } else { - repositoryImplementationType = isDefaultPrimaryKey - ? GetRepositoryTypeForDefaultPk(Options.DefaultRepositoryDbContextType, entityType) - : GetRepositoryType(Options.DefaultRepositoryDbContextType, entityType, primaryKeyType); + repositoryImplementationType = GetRepositoryType(Options.DefaultRepositoryDbContextType, entityType, primaryKeyType); + //repositoryImplementationType = isDefaultPrimaryKey + // ? GetRepositoryTypeForDefaultPk(Options.DefaultRepositoryDbContextType, entityType) + // : GetRepositoryType(Options.DefaultRepositoryDbContextType, entityType, primaryKeyType); } services.AddDefaultRepository(entityType, repositoryImplementationType); @@ -87,7 +89,7 @@ namespace Volo.Abp.Domain.Repositories protected abstract IEnumerable GetEntityTypes(Type dbContextType); - protected abstract Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType); + //protected abstract Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType); protected abstract Type GetRepositoryType(Type dbContextType, Type entityType, Type primaryKeyType); } diff --git a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index 869d090176..07047bd69b 100644 --- a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -11,15 +11,15 @@ using Volo.Abp.Threading; namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { - public class EfCoreRepository : EfCoreRepository, IEfCoreRepository - where TDbContext : IEfCoreDbContext - where TEntity : class, IEntity - { - public EfCoreRepository(IDbContextProvider dbContextProvider) - : base(dbContextProvider) - { - } - } + //public class EfCoreRepository : EfCoreRepository, IEfCoreRepository + // where TDbContext : IEfCoreDbContext + // where TEntity : class, IEntity + //{ + // public EfCoreRepository(IDbContextProvider dbContextProvider) + // : base(dbContextProvider) + // { + // } + //} public class EfCoreRepository : QueryableRepositoryBase, IEfCoreRepository, diff --git a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs index e7e6ab171f..d32912d1d4 100644 --- a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs +++ b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs @@ -4,11 +4,11 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { - public interface IEfCoreRepository : IEfCoreRepository, IQueryableRepository - where TEntity : class, IEntity - { + //public interface IEfCoreRepository : IEfCoreRepository, IQueryableRepository + // where TEntity : class, IEntity + //{ - } + //} public interface IEfCoreRepository : IQueryableRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EfCoreRepositoryRegistrar.cs b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EfCoreRepositoryRegistrar.cs index f481fadc69..db0dcdc13f 100644 --- a/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EfCoreRepositoryRegistrar.cs +++ b/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/EfCoreRepositoryRegistrar.cs @@ -17,10 +17,10 @@ namespace Volo.Abp.EntityFrameworkCore.DependencyInjection return DbContextHelper.GetEntityTypes(dbContextType); } - protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) - { - return typeof(EfCoreRepository<,>).MakeGenericType(dbContextType, entityType); - } + //protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) + //{ + // return typeof(EfCoreRepository<,>).MakeGenericType(dbContextType, entityType); + //} protected override Type GetRepositoryType(Type dbContextType, Type entityType, Type primaryKeyType) { diff --git a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs index 59f001195a..8eba8ede94 100644 --- a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs +++ b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs @@ -4,11 +4,11 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories.MemoryDb { - public interface IMemoryDbRepository : IMemoryDbRepository, IQueryableRepository - where TEntity : class, IEntity - { + //public interface IMemoryDbRepository : IMemoryDbRepository, IQueryableRepository + // where TEntity : class, IEntity + //{ - } + //} public interface IMemoryDbRepository : IQueryableRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs index dcccdd6b07..bd2a03b4bb 100644 --- a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs +++ b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs @@ -6,15 +6,15 @@ using Volo.Abp.MemoryDb; namespace Volo.Abp.Domain.Repositories.MemoryDb { - public class MemoryDbRepository : MemoryDbRepository, IMemoryDbRepository - where TMemoryDbContext : MemoryDbContext - where TEntity : class, IEntity - { - public MemoryDbRepository(IMemoryDatabaseProvider databaseProvider) - : base(databaseProvider) - { - } - } + //public class MemoryDbRepository : MemoryDbRepository, IMemoryDbRepository + // where TMemoryDbContext : MemoryDbContext + // where TEntity : class, IEntity + //{ + // public MemoryDbRepository(IMemoryDatabaseProvider databaseProvider) + // : base(databaseProvider) + // { + // } + //} public class MemoryDbRepository : QueryableRepositoryBase, IMemoryDbRepository where TMemoryDbContext : MemoryDbContext diff --git a/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs b/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs index bf0d7dc011..08fa5d7a8f 100644 --- a/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs +++ b/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/DependencyInjection/MemoryDbRepositoryRegistrar.cs @@ -18,11 +18,6 @@ namespace Volo.Abp.MemoryDb.DependencyInjection return memoryDbContext.GetEntityTypes(); } - protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) - { - return typeof(MemoryDbRepository<,>).MakeGenericType(dbContextType, entityType); - } - protected override Type GetRepositoryType(Type dbContextType, Type entityType, Type primaryKeyType) { return typeof(MemoryDbRepository<,,>).MakeGenericType(dbContextType, entityType, primaryKeyType); diff --git a/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs b/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs index 82ffb23f6b..e33d7116c5 100644 --- a/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs +++ b/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs @@ -4,11 +4,11 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories.MongoDB { - public interface IMongoDbRepository : IMongoDbRepository, IQueryableRepository - where TEntity : class, IEntity - { + //public interface IMongoDbRepository : IMongoDbRepository, IQueryableRepository + // where TEntity : class, IEntity + //{ - } + //} public interface IMongoDbRepository : IQueryableRepository where TEntity : class, IEntity diff --git a/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index c18cb143b2..7ad3f6c29a 100644 --- a/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -10,15 +10,15 @@ using Volo.Abp.MongoDB; namespace Volo.Abp.Domain.Repositories.MongoDB { - public class MongoDbRepository : MongoDbRepository, IMongoDbRepository - where TMongoDbContext : AbpMongoDbContext - where TEntity : class, IEntity - { - public MongoDbRepository(IMongoDatabaseProvider databaseProvider) - : base(databaseProvider) - { - } - } + //public class MongoDbRepository : MongoDbRepository, IMongoDbRepository + // where TMongoDbContext : AbpMongoDbContext + // where TEntity : class, IEntity + //{ + // public MongoDbRepository(IMongoDatabaseProvider databaseProvider) + // : base(databaseProvider) + // { + // } + //} public class MongoDbRepository : QueryableRepositoryBase, IMongoDbRepository where TMongoDbContext : AbpMongoDbContext diff --git a/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs b/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs index 0ab8861ff5..9b94969a59 100644 --- a/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs +++ b/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/DependencyInjection/MongoDbRepositoryRegistrar.cs @@ -19,11 +19,6 @@ namespace Volo.Abp.MongoDB.DependencyInjection return mongoDbContext.GetMappings().Select(m => m.EntityType); } - protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) - { - return typeof(MongoDbRepository<,>).MakeGenericType(dbContextType, entityType); - } - protected override Type GetRepositoryType(Type dbContextType, Type entityType, Type primaryKeyType) { return typeof(MongoDbRepository<,,>).MakeGenericType(dbContextType, entityType, primaryKeyType); diff --git a/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PersonAppService_Tests.cs b/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PersonAppService_Tests.cs index 445e226de4..7c21ad6ee5 100644 --- a/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PersonAppService_Tests.cs +++ b/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/PersonAppService_Tests.cs @@ -21,13 +21,13 @@ namespace Volo.Abp.AspNetCore.Mvc public class PersonAppService_Tests : AspNetCoreMvcTestBase { - private readonly IQueryableRepository _personRepository; + private readonly IQueryableRepository _personRepository; private readonly IJsonSerializer _jsonSerializer; private readonly IObjectMapper _objectMapper; public PersonAppService_Tests() { - _personRepository = ServiceProvider.GetRequiredService>(); + _personRepository = ServiceProvider.GetRequiredService>(); _jsonSerializer = ServiceProvider.GetRequiredService(); _objectMapper = ServiceProvider.GetRequiredService(); } diff --git a/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs b/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs index 8a0f7ae652..c9ba7b5b29 100644 --- a/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs +++ b/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs @@ -25,9 +25,9 @@ namespace Volo.Abp.Domain.Repositories //Assert - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); - services.ShouldNotContainService(typeof(IRepository)); + //services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + services.ShouldNotContainService(typeof(IRepository)); } [Fact] @@ -46,9 +46,9 @@ namespace Volo.Abp.Domain.Repositories //Assert - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + //services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); } [Fact] @@ -61,7 +61,7 @@ namespace Volo.Abp.Domain.Repositories var options = new TestDbContextRegistrationOptions(typeof(MyFakeDbContext)); options .AddDefaultRepositories(true) - .AddCustomRepository(); + .AddCustomRepository(); //Act @@ -69,9 +69,9 @@ namespace Volo.Abp.Domain.Repositories //Assert - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestAggregateRootWithDefaultPkCustomRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestAggregateRootWithDefaultPkCustomRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); + //services.ShouldContainTransient(typeof(IRepository), typeof(MyTestAggregateRootWithDefaultPkCustomRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestAggregateRootWithDefaultPkCustomRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestDefaultRepository)); } [Fact] @@ -84,7 +84,7 @@ namespace Volo.Abp.Domain.Repositories var options = new TestDbContextRegistrationOptions(typeof(MyFakeDbContext)); options .AddDefaultRepositories(true) - .SetDefaultRepositoryClasses(typeof(MyTestCustomBaseRepository<,>), typeof(MyTestCustomBaseRepository<>)); + .SetDefaultRepositoryClasses(typeof(MyTestCustomBaseRepository<,>)); //Act @@ -92,9 +92,9 @@ namespace Volo.Abp.Domain.Repositories //Assert - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); - services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); + //services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); + services.ShouldContainTransient(typeof(IRepository), typeof(MyTestCustomBaseRepository)); } public class MyTestRepositoryRegistrar : RepositoryRegistrarBase @@ -108,15 +108,15 @@ namespace Volo.Abp.Domain.Repositories { return new[] { - typeof(MyTestEntityWithCustomPk), - typeof(MyTestAggregateRootWithDefaultPk) + typeof(MyTestEntityWithInt32Pk), + typeof(MyTestAggregateRootWithGuidPk) }; } - protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) - { - return typeof(MyTestDefaultRepository<>).MakeGenericType(entityType); - } + //protected override Type GetRepositoryTypeForDefaultPk(Type dbContextType, Type entityType) + //{ + // return typeof(MyTestDefaultRepository<>).MakeGenericType(entityType); + //} protected override Type GetRepositoryType(Type dbContextType, Type entityType, Type primaryKeyType) { @@ -126,21 +126,21 @@ namespace Volo.Abp.Domain.Repositories public class MyFakeDbContext { } - public class MyTestAggregateRootWithDefaultPk : AggregateRoot + public class MyTestAggregateRootWithGuidPk : AggregateRoot { } - public class MyTestEntityWithCustomPk : Entity + public class MyTestEntityWithInt32Pk : Entity { } - public class MyTestDefaultRepository : MyTestDefaultRepository - where TEntity : class, IEntity - { + //public class MyTestDefaultRepository : MyTestDefaultRepository + // where TEntity : class, IEntity + //{ - } + //} public class MyTestDefaultRepository : RepositoryBase where TEntity : class, IEntity @@ -176,13 +176,7 @@ namespace Volo.Abp.Domain.Repositories } } - public class MyTestAggregateRootWithDefaultPkCustomRepository : MyTestDefaultRepository - { - - } - - public class MyTestCustomBaseRepository : MyTestCustomBaseRepository - where TEntity : class, IEntity + public class MyTestAggregateRootWithDefaultPkCustomRepository : MyTestDefaultRepository { } diff --git a/test/Volo.Abp.Identity.Tests/Volo/Abp/Identity/Initialize_Tests.cs b/test/Volo.Abp.Identity.Tests/Volo/Abp/Identity/Initialize_Tests.cs index 3eca23445e..b6a970e827 100644 --- a/test/Volo.Abp.Identity.Tests/Volo/Abp/Identity/Initialize_Tests.cs +++ b/test/Volo.Abp.Identity.Tests/Volo/Abp/Identity/Initialize_Tests.cs @@ -27,10 +27,10 @@ namespace Volo.Abp.Identity (ServiceProvider.GetRequiredService() is EfCoreIdentityUserRepository).ShouldBeTrue(); (ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); - (ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); + //(ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); (ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); - (ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); + //(ServiceProvider.GetRequiredService>() is EfCoreIdentityUserRepository).ShouldBeTrue(); } } } diff --git a/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MemoryDb_SoftDelete_DataFilter_Tests.cs b/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MemoryDb_SoftDelete_DataFilter_Tests.cs index d627dfbabd..b3dc6cd4ed 100644 --- a/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MemoryDb_SoftDelete_DataFilter_Tests.cs +++ b/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MemoryDb_SoftDelete_DataFilter_Tests.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using Microsoft.Extensions.DependencyInjection; using Shouldly; using Volo.Abp.Data; @@ -10,12 +11,12 @@ namespace Volo.Abp.MemoryDb.DataFilters { public class MemoryDb_SoftDelete_DataFilter_Tests : MemoryDbTestBase { - private readonly IQueryableRepository _personRepository; + private readonly IQueryableRepository _personRepository; private readonly IDataFilter _dataFilter; public MemoryDb_SoftDelete_DataFilter_Tests() { - _personRepository = ServiceProvider.GetRequiredService>(); + _personRepository = ServiceProvider.GetRequiredService>(); _dataFilter = GetRequiredService(); } diff --git a/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/MemoryDb_Basic_Repository_Tests.cs b/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/MemoryDb_Basic_Repository_Tests.cs index 768460f0ba..9053d22363 100644 --- a/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/MemoryDb_Basic_Repository_Tests.cs +++ b/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/MemoryDb_Basic_Repository_Tests.cs @@ -10,11 +10,11 @@ namespace Volo.Abp.MemoryDb.Repositories { public class MemoryDb_Basic_Repository_Tests : MemoryDbTestBase { - private readonly IQueryableRepository _personRepository; + private readonly IQueryableRepository _personRepository; public MemoryDb_Basic_Repository_Tests() { - _personRepository = ServiceProvider.GetRequiredService>(); + _personRepository = ServiceProvider.GetRequiredService>(); } [Fact] diff --git a/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs b/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs index 9a0188d96d..e356d452a2 100644 --- a/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs +++ b/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IPeopleAppService.cs @@ -6,7 +6,7 @@ using Volo.Abp.TestApp.Application.Dto; namespace Volo.Abp.TestApp.Application { - public interface IPeopleAppService : IAsyncCrudAppService + public interface IPeopleAppService : IAsyncCrudAppService { Task> GetPhones(Guid id, GetPersonPhonesFilter filter); diff --git a/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs b/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs index 0561f6fcef..7bc4ad087e 100644 --- a/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs +++ b/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/PeopleAppService.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.TestApp.Application { public class PeopleAppService : AsyncCrudAppService, IPeopleAppService { - public PeopleAppService(IQueryableRepository repository) + public PeopleAppService(IQueryableRepository repository) : base(repository) {