public void AddDoctor(AddOrUpdateDoctorRequest req) { var addedDoctor = _context.Add(new Doctor { FirstName = req.FirstName, LastName = req.LastName, Email = req.Email }); _context.SaveChanges(); }
public void AddDoctor(Doctor doctor) { _context.Attach(doctor); _context.Add(doctor); _context.SaveChanges(); }