Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public static void Put(Remedy remedy)
 {
     string jsonRemedy  = JsonConvert.SerializeObject(remedy);
     var    apiCallTask = ApiHelper.Put(remedy.RemedyId, jsonRemedy);
 }