Exemplo n.º 1
0
 public static IEnumerable<Course> parseCourses(string content)
 {
     List<Course> parsedValues = new List<Course>();
     JArray jArray = JArray.Parse(content);
     System.Diagnostics.Debug.WriteLine("JArray size = " + jArray.Count);
     for (int i = 0; i < jArray.Count; i++)
     {
         JObject innerObject = (JObject)jArray[i];
         Course course = new Course();
         course.name = (string)innerObject.SelectToken("name");
         course._id = (int)innerObject.SelectToken("id");
         parsedValues.Add(course);
     }
     return parsedValues;
 }
Exemplo n.º 2
0
 public void delete(Course course)
 {
     MobilisDatabase.getDatabase().Delete<Course>(course);
 }
Exemplo n.º 3
0
 public void insert(Course course)
 {
     MobilisDatabase.getDatabase().Insert(course);
 }