0

//controller
[HttpPost]
        public ActionResult Create(List<Music> musicList)
        {
            var x = Post.Add(musicList); <--ivegoterrorhere
            return View();
        }

//webAPI
public class MusicController : ApiController
    {

        // POST: api/Music
        public static string Post(List<Music> musicList)
        {
            
            MusicBusiness.addMusic(musicList);
            return "successful";

        }
    }

What is the correct way of consuming a web api if it is separated from the main web application? My solution has two projects, webAPI and The web Application project is going to call the webAPI project.

0 Answers0