Next, we need to create an interface. To do this, we need to go through the following steps:
- Create a new folder in your solution called Interfaces and add an interface called IWorkItemService to the Interfaces folder, as shown in the following screenshot:
- Add the following code to the IWorkItemService interface:
public interface IWorkItemService
{
IEnumerable<WorkItem> GetAllWorkItems();
}
- In your Data folder, add another class called WorkItemService and make it implement the IWorkItemService interface.
Be sure to add the using statement to reference your interface. In my example, this is ...