Deleting the Tasks
Learn how to delete tasks from the database.
We'll cover the following...
We'll cover the following...
We need to allow users to delete tasks. We do this as follows:
- Open the
Index.razor
file. - Update the
button
element to the following by adding the below code:
Press + to interact
<button class="btn btn-outline-danger btn-sm"title="Delete task"@onclick="@(()=>DeleteTask(taskItem))"><span class="oi oi-trash"></span></button>