public async Task <List <Cat> > GetCats() { var Service = new AzureService <Cat>(); var Items = await Service.GetTable(); return(Items.ToList()); }
public async Task <List <Cat> > GetCats() { //Chamada RestFull //List<Cat> Cats; //var URLWebApi = "http://demos.ticapacitacion.com/cats"; //using (var Client = new System.Net.Http.HttpClient()) { // var JSON = await Client.GetStringAsync(URLWebApi); // Cats = JsonConvert.DeserializeObject <List<Cat>> (JSON); //} //Calling to Azure Service with the Type required, in this case Cat type var Service = new AzureService <Cat>(); //Var with the Table var Items = await Service.GetTable(); //Return Table as List<Cat> return(Items.ToList()); }