[ADD] Adding models, repositories. Implementing business logic.

This commit is contained in:
max
2024-12-22 02:15:34 +01:00
parent 7ebe1e1752
commit 44e64793b7
12 changed files with 147 additions and 41 deletions

View File

@@ -0,0 +1,7 @@
namespace DotBased.AspNet.Authority.Interfaces;
public interface ISecurityVersionRepository<in TRepositoryObject>
{
public Task<long> GetSecurityVersionAsync(TRepositoryObject obj);
}

View File

@@ -1,6 +1,8 @@
namespace DotBased.AspNet.Authority.Interfaces;
public interface IUserRepository
public interface IUserRepository<TUser, TId> : IVersionRepository<TUser>, ISecurityVersionRepository<TUser> where TUser : class where TId : IEquatable<TId>
{
public Task<TUser?> GetUserByIdAsync(TId id);
public Task<TId> GetUserIdAsync(TUser user);
}

View File

@@ -0,0 +1,6 @@
namespace DotBased.AspNet.Authority.Interfaces;
public interface IVersionRepository<in TRepositoryObject>
{
public Task<long> GetVersionAsync(TRepositoryObject obj);
}