You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using (var db = await this.DbFactory.Create<ExampleDb>())
{
db.People.Clear();
await db.SaveChanges();
}
To drop a table or delete the database you will have to access the TG.Blazor.IndexedDB.IndexedDBManager from the third party library https://github.com/wtulloch/Blazor.IndexedDB that this library is using:
When you inherit from IndexedDb, you also inherit protected IndexedDBManager connector;
public class ExampleDb : IndexedDb
{
public ExampleDb(IJSRuntime jSRuntime, string name, int version) : base(jSRuntime, name, version) { }
public IndexedSet<Person> People { get; set; }
public async Task DoSomething()
{
await this.connector.ClearStore(string storeName); // connector is IndexedDBManager
await this.connector.DeleteDb(string dbName);
}
}
TG.Blazor.IndexedDb is not my library, I am only using it.
Jinjinov
changed the title
How to Remove/drop the table and database from INdexeddb
How to remove/drop the table and database from IndexedDB
Jan 4, 2022
No description provided.
The text was updated successfully, but these errors were encountered: