mirror of
https://github.com/ryzij/AMessanger-Server.git
synced 2026-09-18 19:25:38 +00:00
19 lines
772 B
C#
19 lines
772 B
C#
using AMessanger.Core.Models;
|
|
using AMessanger.Core.DTO;
|
|
|
|
namespace AMessanger.Core.Abstraction;
|
|
|
|
public interface IUsersRepository
|
|
{
|
|
public Task<Result<Guid>> AddAsync(User user, CancellationToken cancellationToken = default);
|
|
|
|
public Task<Result<User>> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
|
|
|
public Task<Result<User>> GetByUserNameAsync(string userName, CancellationToken cancellationToken = default);
|
|
|
|
public Task<Result<IEnumerable<User>>> GetAllAsync(CancellationToken cancellationToken = default);
|
|
|
|
public Task<Result<User>> UpdateAsync(Guid id, UpdateUserDto dto, CancellationToken cancellationToken = default);
|
|
|
|
public Task<Result<Guid>> DeleteAsync(Guid id, CancellationToken cancellationToken = default);
|
|
} |