Building an admin interface
Now, it’s time to build a simple admin interface for our blog.
We need to be able to do the following:
- List categories
- Edit categories
- List tags
- Edit tags
- List blog posts
- Edit blog posts
If we look at the preceding list, we might notice that some of the things seem similar – perhaps we can build shared components for those. Categories and tags are very similar; they have names, and the name is the only thing we should be able to edit.
Let’s make a component for that. The component is going to be responsible for listing, adding, deleting, and updating the object.
Since the object we are working with is either Category or Tag, we need to be able to call different APIs depending on the object, so our component needs to be generic:
- In the
SharedComponentsproject, in the root of the project, add a new Razor component and call itItemList.razor. - Open the newly...