[CHANGE] Repository manager
This commit is contained in:
@@ -2,6 +2,6 @@ namespace DotBased.AspNet.Authority.Repositories;
|
||||
|
||||
public interface IAuthorityRepository
|
||||
{
|
||||
public Task<int> GetVersion();
|
||||
public Task SetVersion(int version);
|
||||
public Task<long> GetVersion();
|
||||
public Task SetVersion(long version);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace DotBased.AspNet.Authority.Repositories;
|
||||
|
||||
public interface IGroupRepository<TGroup, TId> where TGroup : class where TId : IEquatable<TId>
|
||||
public interface IGroupRepository<TGroup> where TGroup : class
|
||||
{
|
||||
|
||||
}
|
||||
13
DotBased.AspNet.Authority/Repositories/RepositoryManager.cs
Normal file
13
DotBased.AspNet.Authority/Repositories/RepositoryManager.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace DotBased.AspNet.Authority.Repositories;
|
||||
|
||||
public class RepositoryManager<TUser, TGroup> where TUser : class where TGroup : class
|
||||
{
|
||||
public RepositoryManager(IUserRepository<TUser> userRepository, IGroupRepository<TGroup> groupRepository)
|
||||
{
|
||||
UserRepository = userRepository;
|
||||
GroupRepository = groupRepository;
|
||||
}
|
||||
|
||||
public IUserRepository<TUser> UserRepository { get; set; }
|
||||
public IGroupRepository<TGroup> GroupRepository { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user