Exemple #1
0
        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);
        }
Exemple #2
0
        public IActionResult AddArtist([FromBody] AddArtistPostViewModel artists)
        {
            var aid = Music.StoreArtistData(artists);

            return(Ok(aid));
        }