Fixed half of warnings having to do with allowing Null string objects. (#791)

This commit is contained in:
newenay
2022-09-08 16:48:47 -04:00
committed by GitHub
parent 60fe2dae60
commit 36dbc2f256
27 changed files with 65 additions and 65 deletions

View File

@@ -24,24 +24,24 @@ public class LoginModel : PageModel
}
[BindProperty]
public InputModel Input { get; set; }
public InputModel? Input { get; set; }
public IList<AuthenticationScheme> ExternalLogins { get; set; }
public IList<AuthenticationScheme>? ExternalLogins { get; set; }
public string ReturnUrl { get; set; }
public string? ReturnUrl { get; set; }
[TempData]
public string ErrorMessage { get; set; }
public string? ErrorMessage { get; set; }
public class InputModel
{
[Required]
[EmailAddress]
public string Email { get; set; }
public string? Email { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
public string? Password { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
@@ -101,7 +101,7 @@ public class LoginModel : PageModel
return Page();
}
private async Task TransferAnonymousBasketToUserAsync(string userName)
private async Task TransferAnonymousBasketToUserAsync(string? userName)
{
if (Request.Cookies.ContainsKey(Constants.BASKET_COOKIENAME))
{