public IHttpActionResult PostArtist(Artist artist)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            _db.Artists.Add(artist);
            _db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new {id = artist.ArtistId}, artist);
        }
        public IHttpActionResult PutArtist(int id, Artist artist)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            // private setter on ArtistId so it is not bound
            var existingArtist = _db.Artists.SingleOrDefault(x => x.ArtistId == id);
            if (existingArtist == null)
            {
                return NotFound();
            }

            // TODO Handle DbUpdateConcurrencyException
            existingArtist.Name = artist.Name;
            _db.SaveChanges();

            return Ok(artist);
        }