Example #1
0
        public System.Threading.Tasks.Task CreateAsync(IdentityRole role)
        {
            if (role == null)
            {
                throw new ArgumentNullException("role");
            }

            var r = getRole(role);

            _securityDbService.RoleRepository.Add(r);
            return(_securityDbService.SaveChangesAsync());
        }
Example #2
0
        public Task CreateAsync(IdentityUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            var u = getUser(user);

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