public static Major FromDataAccessObject(DataAccess.Major obj) { if (obj == null) { return(null); } Major newObj = new Major(); ServiceObjects.Major.Copy(obj, newObj); return(newObj); }
public static Major FromDataAccessObject(DataAccess.Major obj) { if (obj == null) { return(null); } Major newObj = new Major(); ServiceObjects.Major.Copy(obj, newObj); newObj.Links.Add(new Link("Students", LinkType.Students, RESTUrlUtil.Service.RESTSvc.GetStudentsByMajorID(newObj.ID, 1))); return(newObj); }
protected static void Copy(DataAccess.Major obj, Major newObj) { newObj.ID = obj.ID; newObj.Name = obj.Name; }
static partial void PerformPreDeleteLogic(DataAccess.SampleObjectContext context, DataAccess.Major obj) { if (obj.Students != null) { foreach (DataAccess.Student student in obj.Students) { StudentLogic.DeleteStudent(context, student.ID); } } }