Skip to content

Instantly share code, notes, and snippets.

@jz5
Created July 7, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jz5/c3e31200df67219d376d2d69ef075c2b to your computer and use it in GitHub Desktop.
Save jz5/c3e31200df67219d376d2d69ef075c2b to your computer and use it in GitHub Desktop.
@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