Example #1
0
        public void AddDoctor(AddOrUpdateDoctorRequest req)
        {
            var addedDoctor = _context.Add(new Doctor {
                FirstName = req.FirstName, LastName = req.LastName, Email = req.Email
            });

            _context.SaveChanges();
        }
Example #2
0
 public void AddDoctor(Doctor doctor)
 {
     _context.Attach(doctor);
     _context.Add(doctor);
     _context.SaveChanges();
 }