Do not use Entity and Repository default PK interfaces.

pull/194/head
Halil İbrahim Kalkan 8 years ago
parent 60ac2397ff
commit 6751ce6628

@ -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; }

@ -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; }

@ -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>

@ -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);

@ -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);

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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)

@ -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)

@ -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; }

@ -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; }

@ -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>
{
}

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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; }

@ -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);
}

@ -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);

@ -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; }

@ -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

@ -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);

@ -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;

@ -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; }

@ -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; }

@ -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)
{

@ -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)
{

@ -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)

@ -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)
{

@ -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);

@ -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; }

@ -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; }

@ -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)

@ -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; }
}

@ -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>
{

@ -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; }
}

@ -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;

@ -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; }
}

@ -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>>();
}

@ -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>();
}

@ -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]

@ -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>>();
}

@ -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>();
}

@ -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]

@ -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>>();
}

@ -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; }

@ -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