Use nameof() when returning Views (#196)

This commit is contained in:
Jass Bagga 2017-12-13 11:11:32 -08:00 committed by GitHub
parent 13e4025dac
commit 6eaf1219f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -353,11 +353,11 @@ namespace Company.WebApplication1.Identity.Controllers
var result = await _userManager.ConfirmEmailAsync(user, code);
if (result.Succeeded)
{
return View("ConfirmEmail");
return View(nameof(ConfirmEmail));
}
else
{
return View("Error", new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
return View(nameof(HomeController.Error), new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}