Example #1
0
        public async Task <IActionResult> Get([FromRoute] int id)
        {
            var result = await _service.Get(id);

            return(result != null
                ? (IActionResult)Ok(result)
                : NoContent());
        }
Example #2
0
        public async Task <IActionResult> Get()
        {
            var result = await _service.Get();

            return(Ok(result));
        }