public HttpResponseMessage InsertDependency(FormDataCollection form) { var values = form.Get("values"); var newDependency = new Dependency(); JsonConvert.PopulateObject(values, newDependency); GanttDataProvider.InsertDependency(newDependency); return(Request.CreateResponse(HttpStatusCode.Created, newDependency)); }