Hi to all,
I am making a simple registry program by using EntityFramework and dcMySQL 7.1.96. The MySQL database is located on a remote server. However, it was suggested if for some reasons the server is not available (due to connection problems, server maintenance, etc), the program should run in offline mode as well. In other words, users could reach and read data without the possibility of any modifications. Is there a better solution for this than manually copying data into an SQLite database in case of any modification and update, and in offline mode I can retrieve it from there?
Additionally, How can I tell from a database server if it is available or not in runtime, except for using SaveChanges() and we can see status from the result? I want to regularly monitor the status of the server in real time so that my program could automatically turn into offline mode if necessary.
Offline database
Re: Offline database
"Copying data into an SQLite database" is the only option.imre.dudas wrote:Is there a better solution for this than manually copying data into an SQLite database in case of any modification and update, and in offline mode I can retrieve it from there?
Please call SaveChanges() and process the result correspondingly.imre.dudas wrote:How can I tell from a database server if it is available or not in runtime, except for using SaveChanges() and we can see status from the result?