Let's create a class to hold all of the methods for interacting with the database:
- In the Solution Explorer, right-click on the project, select the Add menu, and then choose the New Folder option.
- A new folder will be created in the solution tree. Name the folder Data.
- Right-click on the Data folder and select the Add menu and then choose the Class... option.
- In the dialog box that appears, enter DataRepository for the name of the file to create and click the Add button.
- A skeleton DataRepository class will be created:
- We are going to create an interface for the data repository so that it can be mocked ...