In this section, we will have a look at how to read a list of work items from the MongoDB database and also how to insert a new work item into the database. I call them work items, because a work item can be a task or a bug. This can be done by performing the following steps:
- In the Models folder, create a new class called WorkItem, as shown in the following screenshot:
- Add the following code to the WorkItem class. You will notice that Id is of type ObjectId. This represents the unique identifier in the MondoDB document that gets created.