// ====================================== // Author: Ebenezer Monney // Email: info@ebenmonney.com // Copyright (c) 2017 www.ebenmonney.com // // ==> Gun4Hire: contact@ebenmonney.com // ====================================== using DAL.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DAL.Core.Interfaces { public interface IAccountManager { Task CheckPasswordAsync(ApplicationUser user, string password); Task> CreateRoleAsync(ApplicationRole role, IEnumerable claims); Task> CreateUserAsync(ApplicationUser user, IEnumerable roles, string password); Task> DeleteRoleAsync(ApplicationRole role); Task> DeleteRoleAsync(string roleName); Task> DeleteUserAsync(ApplicationUser user); Task> DeleteUserAsync(string userId); Task GetRoleByIdAsync(string roleId); Task GetRoleByNameAsync(string roleName); Task GetRoleLoadRelatedAsync(string roleName); Task> GetRolesLoadRelatedAsync(int page, int pageSize); Task> GetUserAndRolesAsync(string userId); Task GetUserByEmailAsync(string email); Task GetUserByIdAsync(string userId); Task GetUserByUserNameAsync(string userName); Task> GetUserRolesAsync(ApplicationUser user); Task>> GetUsersAndRolesAsync(int page, int pageSize); Task> ResetPasswordAsync(ApplicationUser user, string newPassword); Task TestCanDeleteRoleAsync(string roleId); bool TestCanDeleteUserAsync(string userId); Task> UpdatePasswordAsync(ApplicationUser user, string currentPassword, string newPassword); Task> UpdateRoleAsync(ApplicationRole role, IEnumerable claims); Task> UpdateUserAsync(ApplicationUser user); Task> UpdateUserAsync(ApplicationUser user, IEnumerable roles); } }