Browse Source

Do not use Entity and Repository default PK interfaces.

pull/194/head
Halil İbrahim Kalkan 9 years ago
parent
commit
6751ce6628
  1. 2
      src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/BlogPost.cs
  2. 5
      src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/BlogPostComment.cs
  3. BIN
      src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll
  4. 8
      src/Volo.Abp.Ddd/Volo/Abp/Application/Services/ICrudAppService.cs
  5. 3
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs
  6. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs
  7. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
  8. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleClaim.cs
  9. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs
  10. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserClaim.cs
  11. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLogin.cs
  12. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRole.cs
  13. 2
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserToken.cs
  14. 2
      src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs
  15. 2
      src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityUserRepository.cs
  16. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs
  17. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs
  18. 5
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs
  19. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs
  20. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs
  21. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientCorsOrigin.cs
  22. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientIdPRestriction.cs
  23. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUri.cs
  24. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs
  25. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientRedirectUri.cs
  26. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientScope.cs
  27. 5
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs
  28. 5
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs
  29. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs
  30. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs
  31. 5
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs
  32. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs
  33. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Secret.cs
  34. 2
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/UserClaim.cs
  35. 5
      src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResourceRepository.cs
  36. 5
      src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ClientRepository.cs
  37. 5
      src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResourceRepository.cs
  38. 5
      src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/PersistedGrantRepository.cs
  39. 2
      src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/ITenantRepository.cs
  40. 2
      src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/Tenant.cs
  41. 2
      src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/TenantConnectionString.cs
  42. 2
      src/Volo.Abp.MultiTenancy.EntityFrameworkCore/Volo/Abp/MultiTenancy/EfCoreTenantRepository.cs
  43. 5
      test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntity.cs
  44. 7
      test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs
  45. 5
      test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs
  46. 7
      test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs
  47. 5
      test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/ThirdDbContext/ThirdDbContextDummyEntity.cs
  48. 4
      test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/MultiTenant_Filter_Tests.cs
  49. 7
      test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/SoftDelete_Filter_Tests.cs
  50. 7
      test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs
  51. 8
      test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Basic_Repository_Tests.cs
  52. 8
      test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transaction_Tests.cs
  53. 4
      test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs
  54. 4
      test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MultiTenant_Filter_Tests.cs
  55. 2
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs
  56. 4
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs

2
src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/BlogPost.cs

@ -6,7 +6,7 @@ using Volo.Abp.Domain.Entities;
namespace AbpDesk.Blogging
{
public class BlogPost : AggregateRoot
public class BlogPost : AggregateRoot<Guid>
{
public virtual string Title { get; protected set; }

5
src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/BlogPostComment.cs

@ -1,9 +1,10 @@
using JetBrains.Annotations;
using System;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities;
namespace AbpDesk.Blogging
{
public class BlogPostComment : Entity
public class BlogPostComment : Entity<Guid>
{
[NotNull]
public virtual string Name { get; protected set; }

BIN
src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll

Binary file not shown.

8
src/Volo.Abp.Ddd/Volo/Abp/Application/Services/ICrudAppService.cs

@ -1,15 +1,7 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.Abp.Application.Services
{
public interface ICrudAppService<TEntityDto>
: ICrudAppService<TEntityDto, Guid>
where TEntityDto : IEntityDto<Guid>
{
}
public interface ICrudAppService<TEntityDto, in TPrimaryKey>
: ICrudAppService<TEntityDto, TPrimaryKey, PagedAndSortedResultRequestDto>
where TEntityDto : IEntityDto<TPrimaryKey>

3
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@ -5,7 +6,7 @@ using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.Identity
{
public interface IIdentityRoleRepository : IRepository<IdentityRole>
public interface IIdentityRoleRepository : IRepository<IdentityRole, Guid>
{
Task<IdentityRole> FindByNormalizedNameAsync(string normalizedRoleName, CancellationToken cancellationToken);

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs

@ -8,7 +8,7 @@ using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.Identity
{
public interface IIdentityUserRepository : IRepository<IdentityUser>
public interface IIdentityUserRepository : IRepository<IdentityUser, Guid>
{
Task<IdentityUser> FindByNormalizedUserNameAsync([NotNull] string normalizedUserName, CancellationToken cancellationToken);

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs

@ -11,7 +11,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents a role in the identity system
/// </summary>
public class IdentityRole : AggregateRoot, IHasConcurrencyStamp
public class IdentityRole : AggregateRoot<Guid>, IHasConcurrencyStamp
{
/// <summary>
/// Gets or sets the name for this role.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleClaim.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents a claim that is granted to all users within a role.
/// </summary>
public class IdentityRoleClaim : Entity
public class IdentityRoleClaim : Entity<Guid>
{
/// <summary>
/// Gets or sets the of the primary key of the role associated with this claim.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.Identity
{
//Add Name and Surname properties?
public class IdentityUser : AggregateRoot, IHasConcurrencyStamp
public class IdentityUser : AggregateRoot<Guid>, IHasConcurrencyStamp
{
/// <summary>
/// Gets or sets the user name for this user.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserClaim.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents a claim that a user possesses.
/// </summary>
public class IdentityUserClaim : Entity
public class IdentityUserClaim : Entity<Guid>
{
/// <summary>
/// Gets or sets the primary key of the user associated with this claim.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLogin.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents a login and its associated provider for a user.
/// </summary>
public class IdentityUserLogin : Entity
public class IdentityUserLogin : Entity<Guid>
{
/// <summary>
/// Gets or sets the of the primary key of the user associated with this login.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRole.cs

@ -6,7 +6,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents the link between a user and a role.
/// </summary>
public class IdentityUserRole : Entity
public class IdentityUserRole : Entity<Guid>
{
/// <summary>
/// Gets or sets the primary key of the user that is linked to a role.

2
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserToken.cs

@ -7,7 +7,7 @@ namespace Volo.Abp.Identity
/// <summary>
/// Represents an authentication token for a user.
/// </summary>
public class IdentityUserToken : Entity
public class IdentityUserToken : Entity<Guid>
{
/// <summary>
/// Gets or sets the primary key of the user that the token belongs to.

2
src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityRoleRepository.cs

@ -11,7 +11,7 @@ using System;
namespace Volo.Abp.Identity
{
public class EfCoreIdentityRoleRepository : EfCoreRepository<IdentityDbContext, IdentityRole>, IIdentityRoleRepository
public class EfCoreIdentityRoleRepository : EfCoreRepository<IdentityDbContext, IdentityRole, Guid>, IIdentityRoleRepository
{
public EfCoreIdentityRoleRepository(IDbContextProvider<IdentityDbContext> dbContextProvider)
: base(dbContextProvider)

2
src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EfCoreIdentityUserRepository.cs

@ -12,7 +12,7 @@ using Volo.Abp.Identity.EntityFrameworkCore;
namespace Volo.Abp.Identity
{
public class EfCoreIdentityUserRepository : EfCoreRepository<IdentityDbContext, IdentityUser>, IIdentityUserRepository
public class EfCoreIdentityUserRepository : EfCoreRepository<IdentityDbContext, IdentityUser, Guid>, IIdentityUserRepository
{
public EfCoreIdentityUserRepository(IDbContextProvider<IdentityDbContext> dbContextProvider)
: base(dbContextProvider)

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs

@ -5,7 +5,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiResource : AggregateRoot
public class ApiResource : AggregateRoot<Guid>
{
public virtual bool Enabled { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScope.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiScope : Entity
public class ApiScope : Entity<Guid>
{
public virtual string Name { get; set; }

5
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs

@ -1,8 +1,9 @@
using Volo.Abp.Domain.Repositories;
using System;
using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.IdentityServer.ApiResources
{
public interface IApiResourceRepository : IRepository<ApiResource>
public interface IApiResourceRepository : IRepository<ApiResource, Guid>
{
}

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs

@ -8,7 +8,7 @@ using Volo.Abp.Guids;
namespace Volo.Abp.IdentityServer.Clients
{
public class Client : AggregateRoot
public class Client : AggregateRoot<Guid>
{
public virtual string ClientId { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientClaim : Entity
public class ClientClaim : Entity<Guid>
{
public virtual string Type { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientCorsOrigin.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientCorsOrigin : Entity
public class ClientCorsOrigin : Entity<Guid>
{
public virtual string Origin { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientIdPRestriction.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientIdPRestriction : Entity
public class ClientIdPRestriction : Entity<Guid>
{
public virtual string Provider { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUri.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientPostLogoutRedirectUri : Entity
public class ClientPostLogoutRedirectUri : Entity<Guid>
{
public virtual string PostLogoutRedirectUri { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientProperty : Entity
public class ClientProperty : Entity<Guid>
{
public virtual string Key { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientRedirectUri.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientRedirectUri : Entity
public class ClientRedirectUri : Entity<Guid>
{
public virtual string RedirectUri { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientScope.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientScope : Entity
public class ClientScope : Entity<Guid>
{
public virtual string Scope { get; protected set; }

5
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs

@ -1,10 +1,11 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.IdentityServer.Clients
{
public interface IClientRepository : IRepository<Client>
public interface IClientRepository : IRepository<Client, Guid>
{
Task<Client> FindByCliendIdIncludingAllAsync([NotNull] string clientId);
}

5
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/IPersistentGrantRepository.cs

@ -1,10 +1,11 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.IdentityServer.Grants
{
public interface IPersistentGrantRepository : IRepository<PersistedGrant>
public interface IPersistentGrantRepository : IRepository<PersistedGrant, Guid>
{
Task<PersistedGrant> FindByKeyAsync(string key);

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.Grants
{
public class PersistedGrant : AggregateRoot
public class PersistedGrant : AggregateRoot<Guid>
{
public virtual string Key { get; set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs

@ -1,10 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using IdentityServer4.Stores;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
namespace Volo.Abp.IdentityServer.Grants

5
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs

@ -1,11 +1,12 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
namespace Volo.Abp.IdentityServer.IdentityResources
{
public interface IIdentityResourceRepository : IRepository<IdentityResource>
public interface IIdentityResourceRepository : IRepository<IdentityResource, Guid>
{
Task<List<IdentityResource>> FindIdentityResourcesByScopeAsync(string[] scopeNames);

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.IdentityServer.IdentityResources
{
public class IdentityResource : AggregateRoot
public class IdentityResource : AggregateRoot<Guid>
{
public virtual bool Enabled { get; set; } = true;

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Secret.cs

@ -6,7 +6,7 @@ namespace Volo.Abp.IdentityServer
{
//TODO: Eleminate Secret class for simplicity.
public abstract class Secret : Entity
public abstract class Secret : Entity<Guid>
{
public virtual string Description { get; protected set; }

2
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/UserClaim.cs

@ -5,7 +5,7 @@ namespace Volo.Abp.IdentityServer
{
//TODO: Eleminate UserClaim class for simplicity.
public abstract class UserClaim : Entity
public abstract class UserClaim : Entity<Guid>
{
public virtual string Type { get; set; }

5
src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResourceRepository.cs

@ -1,11 +1,12 @@
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using System;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
namespace Volo.Abp.IdentityServer
{
public class ApiResourceRepository : EfCoreRepository<IdentityServerDbContext, ApiResource>, IApiResourceRepository
public class ApiResourceRepository : EfCoreRepository<IdentityServerDbContext, ApiResource, Guid>, IApiResourceRepository
{
public ApiResourceRepository(IDbContextProvider<IdentityServerDbContext> dbContextProvider) : base(dbContextProvider)
{

5
src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ClientRepository.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
@ -7,7 +8,7 @@ using Volo.Abp.IdentityServer.EntityFrameworkCore;
namespace Volo.Abp.IdentityServer
{
public class ClientRepository : EfCoreRepository<IdentityServerDbContext, Client>, IClientRepository
public class ClientRepository : EfCoreRepository<IdentityServerDbContext, Client, Guid>, IClientRepository
{
public ClientRepository(IDbContextProvider<IdentityServerDbContext> dbContextProvider) : base(dbContextProvider)
{

5
src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResourceRepository.cs

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
@ -13,7 +14,7 @@ namespace Volo.Abp.IdentityServer
{
//TODO: This is not true implementation! This repository works for 2 different aggregate root!
public class IdentityResourceRepository : EfCoreRepository<IdentityServerDbContext, IdentityResource>, IIdentityResourceRepository
public class IdentityResourceRepository : EfCoreRepository<IdentityServerDbContext, IdentityResource, Guid>, IIdentityResourceRepository
{
public IdentityResourceRepository(IDbContextProvider<IdentityServerDbContext> dbContextProvider)
: base(dbContextProvider)

5
src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/PersistedGrantRepository.cs

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
@ -9,7 +10,7 @@ using Volo.Abp.IdentityServer.Grants;
namespace Volo.Abp.IdentityServer
{
public class PersistentGrantRepository : EfCoreRepository<IdentityServerDbContext, PersistedGrant>, IPersistentGrantRepository
public class PersistentGrantRepository : EfCoreRepository<IdentityServerDbContext, PersistedGrant, Guid>, IPersistentGrantRepository
{
public PersistentGrantRepository(IDbContextProvider<IdentityServerDbContext> dbContextProvider) : base(dbContextProvider)
{

2
src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/ITenantRepository.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.MultiTenancy
{
public interface ITenantRepository : IRepository<Tenant>
public interface ITenantRepository : IRepository<Tenant, Guid>
{
Task<Tenant> FindByNameIncludeDetailsAsync(string name);

2
src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/Tenant.cs

@ -6,7 +6,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.MultiTenancy
{
public class Tenant : AggregateRoot
public class Tenant : AggregateRoot<Guid>
{
public virtual string Name { get; protected set; }

2
src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/TenantConnectionString.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities;
namespace Volo.Abp.MultiTenancy
{
public class TenantConnectionString : Entity //TODO: This should be a value object!
public class TenantConnectionString : Entity<Guid> //TODO: PK should be TenantId + Name (so, inherit from Entity)
{
public virtual Guid TenantId { get; protected set; }

2
src/Volo.Abp.MultiTenancy.EntityFrameworkCore/Volo/Abp/MultiTenancy/EfCoreTenantRepository.cs

@ -7,7 +7,7 @@ using Volo.Abp.MultiTenancy.EntityFrameworkCore;
namespace Volo.Abp.MultiTenancy
{
public class EfCoreTenantRepository : EfCoreRepository<IMultiTenancyDbContext, Tenant>, ITenantRepository
public class EfCoreTenantRepository : EfCoreRepository<IMultiTenancyDbContext, Tenant, Guid>, ITenantRepository
{
public EfCoreTenantRepository(IDbContextProvider<IMultiTenancyDbContext> dbContextProvider)
: base(dbContextProvider)

5
test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/SampleClasses/MyEntity.cs

@ -1,8 +1,9 @@
using Volo.Abp.Domain.Entities;
using System;
using Volo.Abp.Domain.Entities;
namespace Volo.Abp.AutoMapper.SampleClasses
{
public class MyEntity : Entity
public class MyEntity : Entity<Guid>
{
public int Number { get; set; }
}

7
test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities;
using Xunit;
@ -127,7 +126,7 @@ namespace Volo.Abp.Domain.Repositories
public class MyFakeDbContext { }
public class MyTestAggregateRootWithDefaultPk : AggregateRoot
public class MyTestAggregateRootWithDefaultPk : AggregateRoot<Guid>
{
}
@ -137,7 +136,7 @@ namespace Volo.Abp.Domain.Repositories
}
public class MyTestDefaultRepository<TEntity> : MyTestDefaultRepository<TEntity, Guid>, IRepository<TEntity>
public class MyTestDefaultRepository<TEntity> : MyTestDefaultRepository<TEntity, Guid>
where TEntity : class, IEntity<Guid>
{
@ -182,7 +181,7 @@ namespace Volo.Abp.Domain.Repositories
}
public class MyTestCustomBaseRepository<TEntity> : MyTestCustomBaseRepository<TEntity, Guid>, IRepository<TEntity>
public class MyTestCustomBaseRepository<TEntity> : MyTestCustomBaseRepository<TEntity, Guid>
where TEntity : class, IEntity<Guid>
{

5
test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs

@ -1,8 +1,9 @@
using Volo.Abp.Domain.Entities;
using System;
using Volo.Abp.Domain.Entities;
namespace Volo.Abp.EntityFrameworkCore.TestApp.SecondContext
{
public class BookInSecondDbContext : AggregateRoot
public class BookInSecondDbContext : AggregateRoot<Guid>
{
public string Name { get; set; }
}

7
test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs

@ -1,4 +1,5 @@
using Volo.Abp.DependencyInjection;
using System;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
@ -6,10 +7,10 @@ namespace Volo.Abp.EntityFrameworkCore.TestApp.SecondContext
{
public class SecondContextTestDataBuilder : ITransientDependency
{
private readonly IRepository<BookInSecondDbContext> _bookRepository;
private readonly IRepository<BookInSecondDbContext, Guid> _bookRepository;
private readonly IGuidGenerator _guidGenerator;
public SecondContextTestDataBuilder(IRepository<BookInSecondDbContext> bookRepository, IGuidGenerator guidGenerator)
public SecondContextTestDataBuilder(IRepository<BookInSecondDbContext, Guid> bookRepository, IGuidGenerator guidGenerator)
{
_bookRepository = bookRepository;
_guidGenerator = guidGenerator;

5
test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/ThirdDbContext/ThirdDbContextDummyEntity.cs

@ -1,8 +1,9 @@
using Volo.Abp.Domain.Entities;
using System;
using Volo.Abp.Domain.Entities;
namespace Volo.Abp.EntityFrameworkCore.TestApp.ThirdDbContext
{
public class ThirdDbContextDummyEntity : AggregateRoot
public class ThirdDbContextDummyEntity : AggregateRoot<Guid>
{
public string Value { get; set; }
}

4
test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/MultiTenant_Filter_Tests.cs

@ -17,12 +17,12 @@ namespace Volo.Abp.EntityFrameworkCore.DataFiltering
public class MultiTenant_Filter_Tests : EntityFrameworkCoreTestBase
{
private ICurrentTenant _fakeCurrentTenant;
private readonly IRepository<Person> _personRepository;
private readonly IRepository<Person, Guid> _personRepository;
private readonly IDataFilter<IMultiTenant> _multiTenantFilter;
public MultiTenant_Filter_Tests()
{
_personRepository = GetRequiredService<IRepository<Person>>();
_personRepository = GetRequiredService<IRepository<Person, Guid>>();
_multiTenantFilter = GetRequiredService<IDataFilter<IMultiTenant>>();
}

7
test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DataFiltering/SoftDelete_Filter_Tests.cs

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using Shouldly;
using Volo.Abp.Data;
using Volo.Abp.Domain.Repositories;
@ -9,12 +10,12 @@ namespace Volo.Abp.EntityFrameworkCore.DataFiltering
{
public class SoftDelete_Filter_Tests : EntityFrameworkCoreTestBase
{
private readonly IRepository<Person> _personRepository;
private readonly IRepository<Person, Guid> _personRepository;
private readonly IDataFilter _dataFilter;
public SoftDelete_Filter_Tests()
{
_personRepository = GetRequiredService<IRepository<Person>>();
_personRepository = GetRequiredService<IRepository<Person, Guid>>();
_dataFilter = GetRequiredService<IDataFilter>();
}

7
test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using Microsoft.Extensions.DependencyInjection;
using Shouldly;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.EntityFrameworkCore.TestApp.ThirdDbContext;
@ -9,11 +10,11 @@ namespace Volo.Abp.EntityFrameworkCore
{
public class DbContext_Replace_Tests : EntityFrameworkCoreTestBase
{
private readonly IRepository<ThirdDbContextDummyEntity> _dummyRepository;
private readonly IRepository<ThirdDbContextDummyEntity, Guid> _dummyRepository;
public DbContext_Replace_Tests()
{
_dummyRepository = ServiceProvider.GetRequiredService<IRepository<ThirdDbContextDummyEntity>>();
_dummyRepository = ServiceProvider.GetRequiredService<IRepository<ThirdDbContextDummyEntity, Guid>>();
}
[Fact]

8
test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Basic_Repository_Tests.cs

@ -12,14 +12,14 @@ namespace Volo.Abp.EntityFrameworkCore.Repositories
{
public class Basic_Repository_Tests : EntityFrameworkCoreTestBase
{
private readonly IRepository<Person> _personRepository;
private readonly IRepository<BookInSecondDbContext> _bookRepository;
private readonly IRepository<Person, Guid> _personRepository;
private readonly IRepository<BookInSecondDbContext, Guid> _bookRepository;
private readonly IRepository<PhoneInSecondDbContext, long> _phoneInSecondDbContextRepository;
public Basic_Repository_Tests()
{
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person>>();
_bookRepository = ServiceProvider.GetRequiredService<IRepository<BookInSecondDbContext>>();
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person, Guid>>();
_bookRepository = ServiceProvider.GetRequiredService<IRepository<BookInSecondDbContext, Guid>>();
_phoneInSecondDbContextRepository = ServiceProvider.GetRequiredService<IRepository<PhoneInSecondDbContext, long>>();
}

8
test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transaction_Tests.cs

@ -12,14 +12,14 @@ namespace Volo.Abp.EntityFrameworkCore
{
public class Transaction_Tests : EntityFrameworkCoreTestBase
{
private readonly IRepository<Person> _personRepository;
private readonly IRepository<BookInSecondDbContext> _bookRepository;
private readonly IRepository<Person, Guid> _personRepository;
private readonly IRepository<BookInSecondDbContext, Guid> _bookRepository;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public Transaction_Tests()
{
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person>>();
_bookRepository = ServiceProvider.GetRequiredService<IRepository<BookInSecondDbContext>>();
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person, Guid>>();
_bookRepository = ServiceProvider.GetRequiredService<IRepository<BookInSecondDbContext, Guid>>();
_unitOfWorkManager = ServiceProvider.GetRequiredService<IUnitOfWorkManager>();
}

4
test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs

@ -15,12 +15,12 @@ namespace Volo.Abp.Http.DynamicProxying
public class PersonAppServiceClientProxy_Tests : AbpHttpTestBase
{
private readonly IPeopleAppService _peopleAppService;
private readonly IRepository<Person> _personRepository;
private readonly IRepository<Person, Guid> _personRepository;
public PersonAppServiceClientProxy_Tests()
{
_peopleAppService = ServiceProvider.GetRequiredService<IPeopleAppService>();
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person>>();
_personRepository = ServiceProvider.GetRequiredService<IRepository<Person, Guid>>();
}
[Fact]

4
test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/DataFilters/MultiTenant_Filter_Tests.cs

@ -17,12 +17,12 @@ namespace Volo.Abp.MemoryDb.DataFilters
public class MemoryDb_MultiTenant_Filter_Tests : MemoryDbTestBase
{
private ICurrentTenant _fakeCurrentTenant;
private readonly IRepository<Person> _personRepository;
private readonly IRepository<Person, Guid> _personRepository;
private readonly IDataFilter<IMultiTenant> _multiTenantFilter;
public MemoryDb_MultiTenant_Filter_Tests()
{
_personRepository = GetRequiredService<IRepository<Person>>();
_personRepository = GetRequiredService<IRepository<Person, Guid>>();
_multiTenantFilter = GetRequiredService<IDataFilter<IMultiTenant>>();
}

2
test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs

@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy;
namespace Volo.Abp.TestApp.Domain
{
public class Person : AggregateRoot, IMultiTenant, ISoftDelete
public class Person : AggregateRoot<Guid>, IMultiTenant, ISoftDelete
{
public virtual Guid? TenantId { get; set; }

4
test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs

@ -10,9 +10,9 @@ namespace Volo.Abp.TestApp
public static Guid TenantId1 { get; } = new Guid("55687dce-595c-41b4-a024-2a5e991ac8f4");
public static Guid TenantId2 { get; } = new Guid("f522d19f-5a86-4278-98fb-0577319c544a");
private readonly IRepository<Person> _personRepository;
private readonly IRepository<Person, Guid> _personRepository;
public TestDataBuilder(IRepository<Person> personRepository)
public TestDataBuilder(IRepository<Person, Guid> personRepository)
{
_personRepository = personRepository;
}

Loading…
Cancel
Save