public async Task <IActionResult> Registration([FromForm] UserDto user) { var appUser = user.GetApplicationUser(); var result = await _userManager.CreateAsync(appUser, user.Password); if (!result.Succeeded) { BadRequest(result.Errors.ToString()); } await _signInManager.SignInAsync(appUser, isPersistent : false); return(Ok()); }