public ResultContext(ResultContextEntity e)
 {
     _Entity = e;
     _JsonValue = e.JsonValue;
     _XmlValue = e.XmlValue;
     _PatientKey = e.PatientKey;
     _ExamKey = e.ExamKey;
 }
        public ResultContextEntity CreateResultContextEntity(ResultEntity resultEntity, ContextTypeEntity contextTypeEntity, string jsonValue, string xmlValue, string patientKey, string examKey)
        {
            ResultContextEntity r = new ResultContextEntity();
            r.JsonValue = jsonValue;
            r.XmlValue = xmlValue;
            r.Result = resultEntity;
            r.ContextType = contextTypeEntity;
            r.PatientKey = patientKey;
            r.ExamKey = examKey;

            _ObjectContext.AddToResultContextEntitySet(r);
            _ObjectContext.SaveChanges();

            return r;
        }