Skip to content

Instantly share code, notes, and snippets.

@jz5

jz5/Index.razor

Created Jul 7, 2020
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