{ //Guardian models internal Models.GuardianModel.MapGuardianResp MapParent(Models.GuardianModel.MapGuardianReq req) { Models.GuardianModel.MapGuardianResp rsp = new Models.GuardianModel.MapGuardianResp(); rsp.apiError = new APIErrors(); bool success = true; foreach (long student in req.ListudentPK) { rsp.apiError.sErrorMessage = "Mapping Successful"; ITGuardian iGuard = _storage.MapParent(student, req.parentPK); //Added Entity if (iGuard != null && iGuard.n > 0) { //nothing } else { success = false; } if (!success) { rsp.apiError.sErrorMessage = "Unable to add Relation. Maybe this relation is pre-existing."; } else { rsp.apiError.jErrorVal = 0; } } return(rsp); }
public object MapParent([FromBody] Models.GuardianModel.MapGuardianReq req) { Bllfiles.BLL_Mapping bllentity = new Bllfiles.BLL_Mapping(); Models.GuardianModel.MapGuardianResp resp = bllentity.MapParent(req); return(resp); }