add new field in product model

This commit is contained in:
stasex 2023-11-09 13:18:23 +02:00
parent e5496ccbfa
commit 17cd3bf438
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,8 @@ public class Product
public required double Rating {get; set;}
public required double Price { get; set; }
public required string[] ImagesUrls {get; set;}
public required bool WasOpened {get; set;}

View File

@ -7,9 +7,9 @@ public partial class Cart : ComponentBase
{
public List<Product> Products = new()
{
new Product {Id = "0", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "0"},
new Product {Id = "1", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "1"},
new Product {Id = "2", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "2"}
new Product {Id = "0", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, Price = 300, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "0"},
new Product {Id = "1", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, Price = 111, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "1"},
new Product {Id = "2", Url = "some link", Name = "HDMI", Description = "super mega hdmi cabel", Rating = 3.8, Price = 50, ImagesUrls = new string[] {"link"}, WasOpened = false, WishlistId = "2"}
};
protected override async Task OnInitializedAsync()