Creating and implementing the RestWebService class
In this section, we will take a look at how to create the RestWebService
class that will inherit from our IRestWebService
interface and implement the underlying instance methods that we declared within our interface class to help us communicate with our SQL Server database, so that we can perform CRUD operations that will be used by our instances of ViewModel
and ContentPage
(views).
Let's start by creating the RestWebService
class for our TrackMyWalks
app by going through the following steps:
- Right-click on the
Services
folder and chooseAdd | New File...
from the pop-up menu.
- Then, choose the
Empty Class
option under theGeneral
section and enterRestWebService
as the name of the class to be created, as shown in the following screenshot:

Creating the RestWebService Class
- Next, click on the
New
button to allow the wizard to proceed and create the new file, as shown in the preceding screenshot. Now that we have created ourRestWebService
class...