So I have a local SQLite table "breadcrumbs" being created on the Android device. How do I go about getting that table's data to store in another external SQL Server database table?
2 回答
If you are able to copy the sqlite db file out from Android device to a Windows machine, you can use sqlite command to dump data to a SQL script with INSERTs. Run the script your Sql Server.
If you want to try something new, you can use entity framework and reflection to achieve that. 1.Use a code generator to generate the model code and the mapping code. 2.use the method DbContext.Database.CreateDatabase() create the database structure in sql server 3.use foreach, reflection and DbContext.Set.Add(TModel) to transmit the data from sqlite to sql server.