Пример #1
0
        /// <param name="content"></param>
        public IActionResult Post([FromBody] Models.Artist content)
        {
            var key = artists.Count + 1;

            artists.Add(key.ToString(), content);
            return(new CreatedResult("artists/" + key, artists.Keys));
        }
Пример #2
0
        /// <param name="content"></param>
        /// <param name="id"></param>
        public IActionResult Put([FromBody] Models.Artist content, string id)
        {
            if (!artists.ContainsKey(id))
            {
                return(new NotFoundObjectResult(""));
            }

            artists[id] = content;

            return(new ObjectResult(content));
        }
Пример #3
0
 public virtual IActionResult PutBase([FromBody] Models.Artist artist, string id)
 {
     // Do not modify this code
     return(((IArtistsController)this).Put(artist, id));
 }
Пример #4
0
 public virtual IActionResult PostBase([FromBody] Models.Artist artist)
 {
     // Do not modify this code
     return(((IArtistsController)this).Post(artist));
 }