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; }
public void delete(Course course) { MobilisDatabase.getDatabase().Delete<Course>(course); }
public void insert(Course course) { MobilisDatabase.getDatabase().Insert(course); }