Creating the interfaces and Work ItemService

Next, we need to create an interface. To do this, we need to perform the following steps:

  1. 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:
  1. Add the following code to the IWorkItemService interface:
public interface IWorkItemService 
{ 
    IEnumerable<WorkItem> GetAllWorkItems(); 
}
  1. 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 the ...

Get C# 7 and .NET Core 2.0 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.