Wpf sqlite tutorial8/3/2023 You can find the code for this example on GitHub at UWP-MVVM-EF-SQLite-2. This week, I’ll show how to save the text box content in a database so it persists between app runs. However, when you close and re-open the app, the text is gone from both places. Last week’s example demonstrated XAML binding: type something in a text box, and when the text box loses focus, the text you typed appears in a text block below it. ![]() Nevertheless, I’ll mention a few things about what’s going on behind the scenes. Using Entity Framework commands, it’s possible to write code without knowing about the details of the physical database. When the app closes, the database does as well. When the app starts up, so does the database. Instead, everything runs in the app process. Unlike traditional databases, SQLite doesn’t use a server process that accepts connections from an app. SQLite is a popular choice, and is well-supported for UWP apps. For this example, I’m going to use a database stored on my local hard drive. To keep data around when the app closes or the computer restarts, we need some kind of data storage mechanism.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |