6:00 PM 0 0
Updated to NET6 and multiple databases supported

Updated to NET6 and multiple databases supported

  Sergi |  April 22022

Wow already 2000 downloads. Also is already using it in some project in production and getting feedbacks to seeing how to improve it.

What's new in this version

  • In this new revision the first thing was to update to .NET6 so that it has long-term support. In addition to solving some small javascript details.
  • One of the things I don't like about the javascript "dependencies" in blazor is the issue of having to add the references in the index.html file, and if you forget your library it doesn't work. So in this version I have solved it and it is not necessary to add any reference to javascript files. But yes, there is still 1 javascript file that is dynamically loaded when needed.
  • Several databases can be managed: In the previous version all the databases were created but only the last one that javascript used was used, in addition to all the tables being added to all the databases. Now that doesn't happen anymore and you can perfectly manage several databases in the explorer's indexDb.
Any questions or queries you know, I'm here to help or enter the web and use the contact form.

The big change you need care

 The bigges change in this version, most than the NET6 updated, is relative how to create the StoreContext, because to solve the issue relative the the different databases we need to add into the StoreContext the generic type  so your change in the code is some like


public DBContext : StoreContext< DbContext >
{
   [...]
}

Initially nothing else need to be changed in your codes.

Other change, or improve, is you can remove from the index.html the 2 javascript references, so if you forgot to add not is not a trouble, code will search the file into _content/DrUalcman-BlazorIndexedDb/MyDbJS.js from where is executing the app.


0 Guest reviews

 
 
 

File