Ejemplo n.º 1
0
        public string CreatePatrients(PatientModel patient)
        {
            var stringwriter = new System.IO.StringWriter();
            var serializer   = new XmlSerializer(patient.GetType());

            serializer.Serialize(stringwriter, patient);
            patients.Add(new Patients {
                ID = patients.Count + 1, PersonXML = stringwriter.ToString()
            });
            return(stringwriter.ToString());
        }
Ejemplo n.º 2
0
        public static Patients TOPatients(this PatientModel obj)
        {
            var stringwriter = new System.IO.StringWriter();
            var serializer   = new XmlSerializer(obj.GetType());

            serializer.Serialize(stringwriter, obj);

            stringwriter.ToString();
            Patients dbModel = new Patients()
            {
                GUIID = obj.PatientGUIID, PersonXML = stringwriter.ToString()
            };

            return(dbModel);
        }