Пример #1
0
        public async Task <IActionResult> GetAlbums([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var albums = await _context.GetAlbumAsync(id);

            if (albums == null)
            {
                return(NotFound());
            }

            return(Ok(albums));
        }