Esempio n. 1
0
        public async Task <IActionResult> Get(int id)
        {
            StewardessDTO temp = await stewardessService.GetStewardessById(id);

            if (temp != null)
            {
                return(Ok(temp));
            }
            else
            {
                return(BadRequest());
            }
        }
        public StewardessDTO Get(int id)
        {
            StewardessDTO temp = stewardessService.GetStewardessById(id);

            if (temp != null)
            {
                Response.StatusCode = 200;
            }
            else
            {
                Response.StatusCode = 404;
            }

            return(temp);
        }