public static void Put(Remedy remedy)
 {
     System.Console.WriteLine("PUT FROM MODEL CALLED!");
     System.Console.WriteLine(remedy.Name);
     string jsonRemedy  = JsonConvert.SerializeObject(remedy);
     var    apiCallTask = ApiHelper.Put(remedy.RemedyId, jsonRemedy);
 }
Exemple #2
0
        public static Remedy GetDetails(int id)
        {
            var apiCallTask = ApiHelper.GetRemedy(id);
            var result      = apiCallTask.Result;

            JObject jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            Remedy  remedy       = JsonConvert.DeserializeObject <Remedy>(jsonResponse.ToString());

            return(remedy);
        }
Exemple #3
0
 public static void Put(Remedy remedy)
 {
     string jsonRemedy  = JsonConvert.SerializeObject(remedy);
     var    apiCallTask = ApiHelper.Put(remedy.RemedyId, jsonRemedy);
 }