Bring the autocomplete bo to live
This commit is contained in:
39
UserService.DatabaseLayer/Repositories/IRepository.cs
Normal file
39
UserService.DatabaseLayer/Repositories/IRepository.cs
Normal file
@ -0,0 +1,39 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UserService.Infrastructure.DataModels;
|
||||
|
||||
namespace UserService.DatabaseLayer.Repositories
|
||||
{
|
||||
public interface IRepository<T> where T : Node
|
||||
{
|
||||
Task<IReadOnlyList<T>> GetAllAsync(Expression<Func<T, bool>>? predicate = null, CancellationToken token = default);
|
||||
Task<T?> GetAsync(Expression<Func<T, bool>> predicate, CancellationToken token = default);
|
||||
Task AddAsync(T entity, CancellationToken token = default);
|
||||
Task<bool> UpdateAsync(T entity, CancellationToken token = default);
|
||||
Task DeleteAsync(T entity, CancellationToken token = default);
|
||||
}
|
||||
|
||||
public interface IOrganizationUnitsRepository : IRepository<OrganizationUnit>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface ISecurityGroupsRepository : IRepository<SecurityGroup>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IUsersRepository : IRepository<User>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IMembersRepository : IRepository<Member>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user