Exemplo n.º 1
0
        public static async Task <IList <City> > GetHasCompanyAsync(int subCategoryId)
        {
            var rest   = new CityRest();
            var cities = await rest.GetHasCompanyAsync(subCategoryId) ?? GetLocalCities();

            SetLocalCities(cities);
            return(cities);
        }
Exemplo n.º 2
0
        public async Task <IList <City> > GetHasCompanyAsync(int subCategoryId)
        {
            var service = new CityRest();
            var items   = await service.GetHasCompanyAsync(subCategoryId);

            ApplicationManager <string> .AddOrUpdate("cities", items);

            return(items.OrderBy(o => o.Name).ToList());
        }
Exemplo n.º 3
0
        public static async Task <IList <City> > GetHasCompanyAsync(int subCategoryId)
        {
            var rest   = new CityRest();
            var result = await rest.GetHasCompanyAsync(subCategoryId);

            if (result.IsValid)
            {
                SetLocalCities(result.Value);
                return(result.Value);
            }
            else
            {
                return(GetLocalCities());
            }
        }