Rob / Entities /Interfaces /IUserRepository.cs
danylokhodus's picture
fix
e7a18fe
Raw
History Blame Contribute Delete
758 Bytes
using Entities.Models;
using System.Threading.Tasks;
namespace Application.Abstractions.Interfaces
{
public interface IUserRepository
{
Task<User?> GetByIdAsync(int userId);
Task<User> GetByEmailAsync(string email);
Task<User?> GetByEmailOrPhoneAsync(string emailOrPhone);
Task<User> GetByGoogleIdAsync(string googleId);
Task<bool> ExistsByEmailAsync(string email);
Task<bool> IsPasswordValidByEmailAsync(string email, string passwordHash);
Task AddAsync(User user);
Task UpdateAsync(User user);
Task<IEnumerable<User>> GetAllAsync();
Task<IEnumerable<User>> SearchUsersAsync(string query);
Task DeleteAsync(int userId);
Task SaveChangesAsync();
}
}