// POST: api/Schedule public HttpResponseMessage Post([FromBody] Schedule schedule) { SchedulePersistence sp = new SchedulePersistence(); int id = sp.CreateNewSchedule(schedule); HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.Created); response.Headers.Location = new Uri(Request.RequestUri, string.Format($"Schedule/{id}")); return(response); }