public async Task <ActionResult> Register(RegisterRequestUser model) { if (await _service.Register(model)) { return(Ok("registered")); } return(BadRequest()); }
public async Task <bool> Register(RegisterRequestUser model) { var user = new User { UserName = model.Email, FullName = model.FullNAme, Email = model.Email, Address = model.Address, City = model.City, Zip = model.Zip }; var result = await UserManager.CreateAsync(user, model.Password); if (result.Succeeded) { return(true); } else { return(false); } }
public Task <bool> Register(RegisterRequestUser model) => _repository.Register(model);