コード例 #1
0
        public async Task <ActionResult <BandArtist> > PostBandArtist(BandArtist bandArtist)
        {
            _uow.BandArtistRepository.Create(bandArtist);
            await _uow.Save();

            return(CreatedAtAction("GetBandArtist", new { id = bandArtist.BandArtistID }, bandArtist));
        }
コード例 #2
0
        public async Task <IActionResult> PutBandArtist(int id, BandArtist bandArtist)
        {
            if (id != bandArtist.BandArtistID)
            {
                return(BadRequest());
            }

            _uow.BandArtistRepository.Update(bandArtist);

            await _uow.Save();


            return(NoContent());
        }