From the course: Xamarin Essential Training: Create Your First App

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Build a data store interface

Build a data store interface

- [Instructor] Let's make this a little more interesting now by adding another class. And we'll have this one be our data access layer. This is going to go out and get data from our REST API. Let's call this ProductService. I'm going to add some additional using statements up here. So I know I'm going to use the Collections. So System.Collections.Generic. I'm going to use also the System.Net.Http. So I'm going to make some Http requests. System.Net.Http.Json And that's in that library that I added as a package. That's going to help me with some of the formatting. And then I want to use System.Threading.Tasks cause I want to be able to provide some async operations in here that I'm going to be able to use cause I'm accessing the network. So I have my ProductService, I'm going to go ahead and in that class, give ourselves a little more room here on the screen for code. I'm going to put a constant. So I'm going to call…

Contents