Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit c700c60

Browse files
committed
Fixed delete functionality null reference exception.
1 parent a8f7250 commit c700c60

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/eShopOnBlazor/Pages/Catalog/Delete.razor

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
@inject NavigationManager NavigationManager
44
@inject ILogger<Delete> Logger
55

6+
67
<div class="container">
78
<div class="row">
89
<img class="col-md-6 esh-picture" src="@($"/Pics/{_item.PictureFileName}")">
9-
1010
<dl class="col-md-6 dl-horizontal">
1111
<dt>
1212
Name
@@ -29,15 +29,19 @@
2929
</dt>
3030

3131
<dd>
32-
@_item.CatalogBrand.Brand
32+
@{
33+
Console.WriteLine(_item.CatalogBrand != null ? _item.CatalogBrand.Brand : String.Empty);
34+
}
3335
</dd>
3436

3537
<dt>
3638
Type
3739
</dt>
3840

3941
<dd>
40-
@_item.CatalogType.Type
42+
@{
43+
Console.WriteLine(_item.CatalogType != null ? _item.CatalogType.Type : String.Empty);
44+
}
4145
</dd>
4246
<dt>
4347
Price

0 commit comments

Comments
 (0)