Updating the BaseViewModel class to include our RestWebService
Now we have created both our RestWebService
interface and class, which will allow us to communicate with the Microsoft Azure platform, as well as our SQL Server database to perform CRUD operations, that will enable us to create, retrieve, update, and delete walk entries.
Our next step is to update the underlying C# code within our BaseViewModel
class. Since our BaseViewModel
class is used by each of our instances of ViewModel
, it makes sense to add these additional properties and instance methods within the BaseViewModel
class.
Let's start by updating the BaseViewModel
class for our TrackMyWalks
app by going through the following steps:
- Locate and open the
BaseViewModel.cs
file, which is located within theViewModels
folder, and ensure that it is displayed within the code editor. Enter the following highlighted code sections:
// // BaseViewModel.cs // BaseView Model Class that each of our ViewModels will inherit from...