![]() This series of posts is based on that video, but he uses a different example, People, covers adding and displaying records, and uses WinForms not WPF. However, I like Tim Corey’s YouTube tutorial called Using SQLite in C# – Building Simple, Powerful, Portable Databases for Your Application. I’m not giving a full instructional lesson on how to build this and how it works. dotConnect for SQLite installed (the corresponding assembly is not available via NuGet, and is available only via the installer). I’m just posting the code with a bit of explanation. ![]() The final source code will be given in a short series of posts. Also, after the user edits a todo, the changes are not displayed until the user clicks the Refresh List button. The data model in part 2 flows down and affects parts 1, 3, 4, 7, and 8 if you make any changes to part 2.Īfter the user adds a new todo, the two text boxes clear but the new todo is not displayed in the list until the user clicks the Refresh List button. The most important part to get right is the data model in part 2. The three most interesting and difficult parts of the project are parts 1, 7, and 8. ![]() To add a new todo, the user needs to add text in both boxes, but the number of characters they can type is not limited. We do not have very good validation in this project. You would also need a description property so that details could be added, and so on. You might also have a property that keeps track of who (which user) made the change. You might also have dates that keep track of when the status changed. You would likely also have a drop-down that allows the use to pick from a list of Status possibilities. In a real project you would likely have more properties in the model, but these could be added later. The ToDo model only has Name and Status, plus an Id that is an autoincrementing primary key. CRUD stands for Create, Read, Update and Delete. This project is set up to be as simple as possible, yet still have CRUD functionality.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |