Code Monkey home page Code Monkey logo

blazor.indexeddb.framework's People

Contributors

reshiru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blazor.indexeddb.framework's Issues

Switch to C# 8.0

After implementing custom connector switch the language to C# 8.0 asap to use IAsyncEnumerable (async yield results) for IndexedSet

Cannot access database from OnAfterRender lifecycle method

If I try to access the database from the OnAfterRenderAsync lifecycle method, or binding to a method that accesses the database, the following exception is thrown:

One or more errors occurred. (JSRuntime must be set up correctly and must be an instance of JSRuntimeBase to use DotNetObjectRef.)

With the following stack trace:

at Microsoft.JSInterop.DotNetObjectRefManager.get_Current()
at Microsoft.JSInterop.DotNetObjectRef`1..ctor(TValue value)
at Microsoft.JSInterop.DotNetObjectRef.Create[TValue](TValue value)
at TG.Blazor.IndexedDB.IndexedDBManager.OpenDb()
at TG.Blazor.IndexedDB.IndexedDBManager.EnsureDbOpen()
at TG.Blazor.IndexedDB.IndexedDBManager.GetRecords[TResult](String storeName)
at Blazor.IndexedDB.Framework.Extensions.TaskExtensions.InvokeAsyncWithResult(MethodInfo this, Object obj, Object[] parameters)
at Blazor.IndexedDB.Framework.IndexedDb.GetRows(Type propertyType, String storeName)
at Blazor.IndexedDB.Framework.IndexedDb.LoadData()
at Blazor.IndexedDB.Framework.IndexedDb.WaitForConnection()
at Blazor.IndexedDB.Framework.IndexedDbFactory.CreateT

However, if I call the same method from a button click it works as expected.

Cannot consume scoped service

I installed the NuGet package and followed the code samples provided, but when I attempted to run the site I get the following error message:

InvalidOperationException: Error while validating the service descriptor 'ServiceType: Blazor.IndexedDB.Framework.IIndexedDbFactory Lifetime: Singleton ImplementationType: Blazor.IndexedDB.Framework.IndexedDbFactory': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.IndexedDB.Framework.IIndexedDbFactory'.

In the Startup.cs file, if I add the library as a transient (i.e. services.AddTransient<IIndexedDbFactory, IndexedDbFactory>();) then my site will load but when I try to call the create method I get an error about TimeGhost not being found in the window. I tried searching online for anything about TimeGhost but had no luck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.