public CourseModel(courses courses) { sourcedId = courses.sourcedId; status = courses.status; dateLastModified = courses.dateLastModified; title = courses.title; schoolYear = JsonConvert.DeserializeObject <ParentModel>(courses.schoolYear); courseCode = courses.courseCode; grades = JsonConvert.DeserializeObject <List <string> >(courses.grades); subjects = JsonConvert.DeserializeObject <List <string> >(courses.subjects); org = JsonConvert.DeserializeObject <ParentModel>(courses.org); }
public OrgModel(orgs orgs) { sourcedId = orgs.sourcedId.ToString(); status = orgs.status; dateLastModified = orgs.dateLastModified; name = orgs.name; type = orgs.type; identifier = orgs.identifier; if (orgs.parentId != null) { parent = new ParentModel() { sourcedId = orgs.parentId.ToString() } } ; } }