Implementing create and delete operations
In your application, you may often need to allow users to create and delete items in a list. From the UI perspective, these operations are typically facilitated using a floating action button (FAB) to create items and swipe actions to delete them.
In this recipe, we will build upon the application created in the previous recipe and implement a typical UI along with the underlying logic to enable users to create and delete items in a collection.
Getting ready
Start with the project you got after finishing the previous recipe (Connecting to a local SQLite database via Entity Framework Core). This project is available at https://github.com/PacktPublishing/.NET-MAUI-Cookbook/tree/main/Chapter04/c4-LocalDatabaseConnection.
The code for this recipe is available at https://github.com/PacktPublishing/.NET-MAUI-Cookbook/tree/main/Chapter04/c4-CreateDelete.
How to do it…
Let’s implement swipe actions to delete items from...