public int StoreArtistData(AddArtistPostViewModel artists) { Artist art = new Artist() { ArtistName = artists.ArtistName, DOB = artists.DOB, Bio = artists.Bio }; context.Artists.Add(art); context.SaveChanges(); int aid = art.ArtistId; return(aid); }
public IActionResult AddArtist([FromBody] AddArtistPostViewModel artists) { var aid = Music.StoreArtistData(artists); return(Ok(aid)); }