Esempio n. 1
0
 public IActionResult GetMusicLabel(int id)
 {
     try
     {
         var result = _dbService.GetMusicLabel(id);
         return(Ok(result));
     }catch (MusicLabelDoesNotExistsException exc)
     {
         return(NotFound(exc.Message));
     }
 }
Esempio n. 2
0
        public IActionResult GetMusicLabel(int id)
        {
            var result = _dbService.GetMusicLabel(id);

            if (result == null)
            {
                return(NotFound("Label not found"));
            }

            return(Ok(result));
        }
Esempio n. 3
0
        public async Task <IActionResult> GetMusicLabel(int id)
        {
            try {
                var res = await _dbService.GetMusicLabel(id);

                return(Ok(res));
            }
            catch (MusicLabelDoNotExistsException exc)
            {
                return(NotFound(exc.Message));
            }
        }