Skip to content

Commit af703b5

Browse files
authored
Merge branch 'development' into patch-3
2 parents 6a3dc2b + 3527613 commit af703b5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/_docfx/tutorial/viewcomponents.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ MyViewComponent<CartSummaryComponent>
118118
.Instance()
119119
.WithSession(session => session
120120
.WithEntry("Session", "TestCart"))
121-
.WithData(db => db
122-
.WithEntities(entities => entities
123-
.AddRange(GetCartItems("TestCart", "TestAlbum"))))
121+
.WithData(CartItemData.GetMany("TestCart", "TestAlbum"))
124122
.InvokedWith(vc => vc.InvokeAsync()) // <---
125123
```
126124

@@ -133,9 +131,7 @@ MyViewComponent<CartSummaryComponent>
133131
.Instance()
134132
.WithSession(session => session
135133
.WithEntry("Session", "TestCart"))
136-
.WithData(db => db
137-
.WithEntities(entities => entities
138-
.AddRange(GetCartItems("TestCart", "TestAlbum"))))
134+
.WithData(CartItemData.GetMany("TestCart", "TestAlbum"))
139135
.InvokedWith(vc => vc.InvokeAsync())
140136
.ShouldHave() // <---
141137
.ViewBag(viewBag => viewBag

0 commit comments

Comments
 (0)