示例#1
0
        public async Task <ActionResult> One(int id)
        {
            try
            {
                await _service.hasAccess(id, User.Identity.Name);

                var hire = _service.GetHireById(id);
                return(Ok(hire));
            }
            catch (HireNotFoundException)
            {
                return(NotFound());
            }
            catch (AccessDeniedException)
            {
                return(Forbid());
            }
        }
        public IActionResult Get(Guid id)
        {
            HireDTO hire = _hireService.GetHireById(id);

            return(Ok(hire));
        }