public System.Threading.Tasks.Task CreateAsync(IdentityRole role) { if (role == null) { throw new ArgumentNullException("role"); } var r = getRole(role); _unitOfWork.RoleRepository.Add(r); return(_unitOfWork.SaveChangesAsync()); }
public Task CreateAsync(IdentityUser user) { if (user == null) { throw new ArgumentNullException("user"); } var u = getUser(user); _unitOfWork.UserRepository.Add(u); return(_unitOfWork.SaveChangesAsync()); }