简体   繁体   中英

ASP.NET MVC 4 with Entity Framework offline with HTML5

I have a form using Entity Framework in MVC. I need to be able use the form offline. How would you push the collected form data to the IndexedDB instead of the server when offline, if even possible?

you can serialize the form data into JSON format and save that into the indexeddb database. Keep in mind that only modern browsers support the indexeddb API. If the data is limited and less than 5 MB I would advice you to take a look at local storage instead. Certainly if you want to support older browsers.

You can use JayData library to managa inbrowser (WebSQL/IndexedDB/HTML5 localstorage) with the same syntax. This tutorial is a good start - How to create a synchronized Online/Offline data application with EntityFramework, JavaScript and JayData

Disclaimer: I'm member of the JayData DEV team, please let me know if I can help you by pointing to the relevant technical documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM