Ejemplo n.º 1
0
        public async Task <IActionResult> RetrieveStaffById(long staffId)
        {
            try
            {
                var staff = await _staffAppService.RetriveStaffById(staffId);

                if (staff == null)
                {
                    return(NotFound("Staff does not exist"));
                }
                return(Ok(staff));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }