public DoctorNotes PostNewNote([FromBody] DoctorNotes note)
        {
            _context.DoctorNotes.Add(note);
            _context.SaveChanges();

            return(note);
        }
예제 #2
0
        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);
        }
예제 #5
0
        public Patient PostNewPatient([FromBody] Patient patient)
        {
            _context.Patient.Add(patient);
            _context.SaveChanges();

            return(patient);
        }
예제 #6
0
        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);
        }