예제 #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 HttpNotFoundObjectResult(""));
            }

            artists[id] = content;

            return(new ObjectResult(content));
        }
 public virtual IActionResult PutBase([FromBody] Models.Artist content, string id)
 {
     // Do not modify this code
     return(((IArtistsController)this).Put(content, id));
 }
 public virtual IActionResult PostBase([FromBody] Models.Artist content)
 {
     // Do not modify this code
     return(((IArtistsController)this).Post(content));
 }