Fix Null Warnings (#874)
* Fixing null warnings * Fix null warnings Fix other compiler warnings
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.ViewModels;
|
||||
|
||||
public class CatalogIndexViewModel
|
||||
{
|
||||
public List<CatalogItemViewModel>? CatalogItems { get; set; }
|
||||
public List<SelectListItem>? Brands { get; set; }
|
||||
public List<SelectListItem>? Types { get; set; }
|
||||
public List<CatalogItemViewModel> CatalogItems { get; set; } = new List<CatalogItemViewModel>();
|
||||
public List<SelectListItem>? Brands { get; set; } = new List<SelectListItem>();
|
||||
public List<SelectListItem>? Types { get; set; } = new List<SelectListItem>();
|
||||
public int? BrandFilterApplied { get; set; }
|
||||
public int? TypesFilterApplied { get; set; }
|
||||
public PaginationInfoViewModel? PaginationInfo { get; set; }
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
namespace Microsoft.eShopWeb.Web.ViewModels.Manage;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.ViewModels.Manage;
|
||||
|
||||
public class RemoveLoginViewModel
|
||||
{
|
||||
public string? LoginProvider { get; set; }
|
||||
public string? ProviderKey { get; set; }
|
||||
[Required]
|
||||
public string LoginProvider { get; set; } = string.Empty;
|
||||
[Required]
|
||||
public string ProviderKey { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.ViewModels;
|
||||
|
||||
@@ -13,5 +11,5 @@ public class OrderViewModel
|
||||
public decimal Total { get; set; }
|
||||
public string Status => DEFAULT_STATUS;
|
||||
public Address? ShippingAddress { get; set; }
|
||||
public List<OrderItemViewModel> OrderItems { get; set; } = new List<OrderItemViewModel>();
|
||||
public List<OrderItemViewModel> OrderItems { get; set; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user