Professional Documents
Culture Documents
Server-side
Main.razor. Going further with the variables, you can notice four lists
created, each with their own type of object. Also, you can see that we
only have one list for score, even though a score has three types. The
types of score are declared as value in the record. To display the current
results, for the most part, we simply bind Count property of the Lists
with the exception of score. For the score, we are displaying total;
therefore, we need to calculate that. To make it simple, we just run a loop
in the page, which gets re-run every time the count property changes.
Finally, we have a few methods that will simply add new item on click.
@page "/"
<div style="width:50%;float:left;">
<TeamComponenent team="1" gameid="@gameid">
</TeamComponenent>
</div>
<div style="width:50%;float:left;">
<TeamComponenent team="2" gameid="@gameid" >
</TeamComponenent>
</div>
@code {
Guid gameid;
149