public Task CreateAsync(IdentityRole role)
        {
            if (role == null)
            {
                throw new ArgumentNullException("role");
            }

            var r = GetRole(role);

            _unitOfWork.RoleRepository.Create(r);
            return(_unitOfWork.SaveChangesAsync());
        }
Пример #2
0
        public Task CreateAsync(IdentityUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            var u = getUser(user);

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