Example #1
0
        public async Task <IActionResult> Get(int id)
        {
            var sage = await _sageQuery.GetByIdAsync(id);

            if (sage == null)
            {
                return(NotFound("No sage with id " + id.ToString()));
            }

            return(Ok(new SageVM(sage)));
        }
Example #2
0
 public async Task <Sage> GetByIdAsync(int id)
 {
     return(await _sageQuery.GetByIdAsync(id));
 }