" @onclick="SetValueAsync"&gt;Set Value&lt;/button&gt;
&lt;/form&gt;
&lt;div&gt;Stored Value: @StoredValue&lt;/div&gt;
&lt;button type="button" @onclick="GetValueAsync"&gt;Get Value&lt;/button&gt;

@code {
    public string BookId { get; set; } = "";
    public string BookName { get; set; } = "";
    public string StoredValue { get; set; } = "";

    public async Task SetValueAsync()
    {
        await IndexedDbAccessor.SetValueAsync("books", new { Id = Convert.ToInt32(BookId), Name = BookName });
    }

 