Example #1
0
        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());
        }
Example #2
0
        public Task CreateAsync(IdentityUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            var u = getUser(user);

            _unitOfWork.UserRepository.Add(u);
            return(_unitOfWork.SaveChangesAsync());
        }