示例#1
0
        public IActionResult GetAllPersons()
        {
            StaffRepositary staffRepository = new StaffRepositary();

            staffRepository = new StaffRepositary();
            return(Ok(staffRepository.GetAll()));
        }
示例#2
0
        public IActionResult AddStaff([FromBody] Staff staff)
        {
            StaffRepositary personRepository = new StaffRepositary();
            var             p = personRepository.Add(staff);

            return(Ok(p));
        }
示例#3
0
        public IActionResult GetPersonById(int staffId)
        {
            StaffRepositary staffRepository = new StaffRepositary();

            return(Ok(staffRepository.GetById(staffId)));
        }