Skip to content

Instantly share code, notes, and snippets.

@jz5
Created July 7, 2020 13:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
@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