Esempio n. 1
0
        public void Insert(int patientid)
        {
            var insert = new Hospital_Entity_Framework.MedicalRecord()
            {
                PatientId = patientid
            };

            _db.MedicalRecords.Add(insert);
            _db.SaveChanges();
        }
Esempio n. 2
0
        private void CheckMedicalRecord(int patientId)
        {
            var chk = _db.MedicalRecords.Any(v => v.PatientId == patientId);

            if (chk == false)
            {
                var insert = new Hospital_Entity_Framework.MedicalRecord()
                {
                    PatientId = patientId
                };
                _db.MedicalRecords.Add(insert);
                _db.SaveChanges();
            }
        }