public DoctorNotes PostNewNote([FromBody] DoctorNotes note) { _context.DoctorNotes.Add(note); _context.SaveChanges(); return(note); }
public Location PostNewLocation([FromBody] Location location) { _context.Location.Add(location); _context.SaveChanges(); return(location); }
public Doctor PostNewDoctor([FromBody] Doctor doctor) { _context.Doctor.Add(doctor); _context.SaveChanges(); return(doctor); }
public Appointment PostNewAppointment([FromBody] Appointment appointment) { _context.Appointment.Add(appointment); _context.SaveChanges(); return(appointment); }
public Patient PostNewPatient([FromBody] Patient patient) { _context.Patient.Add(patient); _context.SaveChanges(); return(patient); }
public Employee PostNewEmployee([FromBody] Employee employee) { PasswordHasher <Employee> hasher = new PasswordHasher <Employee>(); employee.Password = hasher.HashPassword(employee, employee.Password); Console.WriteLine(employee); _context.Employee.Add(employee); _context.SaveChanges(); return(employee); }