Exemplo n.º 1
0
		public async Task<IdentityResult> RegisterUser(UserModel userModel)
		{
			var user = new IdentityUser
			{
				UserName = userModel.UserName
			};

			var result = await _userManager.CreateAsync(user, userModel.Password);
			return result;
		}
		public async Task<IHttpActionResult> Register(UserModel userModel)
		{
			CheckModelSate();

			var result = await _repo.RegisterUser(userModel);

			var errorResult = GetErrorResult(result);

			return errorResult ?? Ok();
		}