Esempio n. 1
0
        public async Task<IHttpActionResult> Register(User userModel)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            IdentityResult result = await _userManager.CreateAsync(userModel);

            IHttpActionResult errorResult = GetErrorResult(result);

            if (errorResult != null)
            {
                return errorResult;
            }

            return Ok();
        }
Esempio n. 2
0
        public async Task<IdentityResult> RegisterUser(User userModel)
        {
            var result = await _userManager.CreateAsync(userModel);

            return result;
        }