Skip to content

Commit d532092

Browse files
committed
nav propertyk nem nullozhatóak
1 parent e090b62 commit d532092

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

WebApiLab.DAL/Entities/OrderItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ public class OrderItem
66

77
public int ProductId { get; set; }
88

9-
public Product? Product { get; set; } = null!;
9+
public Product Product { get; set; } = null!;
1010

1111
public int OrderId { get; set; }
1212

13-
public Order? Order { get; set; } = null!;
13+
public Order Order { get; set; } = null!;
1414

1515
public int Quantity { get; set; }
1616

WebApiLab.DAL/Entities/Product.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public class Product
1212
public int UnitPrice { get; set; }
1313

1414
public int CategoryId { get; set; }
15-
public Category? Category { get; set; }
15+
16+
public Category Category { get; set; } = null!;
1617

1718
public ICollection<OrderItem> ProductOrders { get; } = new List<OrderItem>();
1819

0 commit comments

Comments
 (0)