Created
July 7, 2020 13:27
-
-
Save jz5/c3e31200df67219d376d2d69ef075c2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@code | |
{ | |
public class Friend | |
{ | |
public string Name { get; set; } | |
public int ShoeSize { get; set; } | |
} | |
private async Task GetFriends() | |
{ | |
var friends = | |
await JsRuntime.InvokeAsync<List<Friend>>("getFriends"); | |
} | |
private async Task PutFriend() | |
{ | |
var friend = new Friend | |
{ | |
Name = "Nicolas", | |
ShoeSize = 8 | |
}; | |
var key = await JsRuntime.InvokeAsync<string>("putFriend", friend); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment