public static Location GetDetails(int id)
        {
            var apiCallTask = LocationApiHelper.Get(id);
            var result      = apiCallTask.Result;

            JObject  jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            Location location     = JsonConvert.DeserializeObject <Location>(jsonResponse.ToString());

            return(location);
        }
        public static List <Location> GetLocations()
        {
            var apiCallTask = LocationApiHelper.GetAll();
            var result      = apiCallTask.Result;

            JArray          jsonResponse = JsonConvert.DeserializeObject <JArray>(result);
            List <Location> locationList = JsonConvert.DeserializeObject <List <Location> >(jsonResponse.ToString());

            return(locationList);
        }
 public static void Delete(int id)
 {
     var apiCallTask = LocationApiHelper.Delete(id);
 }
 public static void Put(Location location)
 {
     string jsonLocation = JsonConvert.SerializeObject(location);
     var    apiCallTask  = LocationApiHelper.Put(location.LocationId, jsonLocation);
 }