ITGuardian IStorageService.GetParent(long nStudentFK) { TGuardian iD = null; iD = _Sb.TGuardians.FirstOrDefault(obj => obj.nEntityFKStudent == nStudentFK); return(new OTGuardian(iD)); }
ITGuardian IStorageService.GetGuardian(long nGuardian) { TGuardian iD = null; iD = _Sb.TGuardians.FirstOrDefault(obj => obj.n == nGuardian); return(new OTGuardian(iD)); }
ITGuardian IStorageService.MapParent(long nStudent, long nParent) { TGuardian ps = new TGuardian() { nEntityFKParent = nParent, nEntityFKStudent = nStudent, dStamp = DateTime.UtcNow, bStatus = true, }; _Sb.TGuardians.InsertOnSubmit(ps); if (true) { CommitToDB(); } return(new OTGuardian(ps)); }