async void GetManagementInfosFromServer() { var result = await ManagementHelper.GetManagementInfos(); var aux = JsonConvert.DeserializeObject <dynamic>(result); if (aux != null) { Model.ShelterName = aux.shelterName; Model.ShelterMoney = aux.shelterMoney; Model.LastRevenue = aux.lastRevenue; Model.LastExpense = aux.lastExpense; Model.TotalFood = aux.totalFood; var animalsJson = await PetsHelper.GetPetsList(); var animals = JsonConvert.DeserializeObject <List <Pet> >(animalsJson); Model.TotalAnimals = animals.Count; Model.TotalDogs = animals.Count(x => x.Type.ToLower().Equals("cachorro") || x.Type.ToLower().Equals("dog")); Model.TotalCats = animals.Count(x => x.Type.ToLower().Equals("gato") || x.Type.ToLower().Equals("cat")); } else { await DisplayAlert("Oops. Algo deu errado...", aux.Message, "OK"); await Navigation.PopAsync(true); } }