public HttpResponseMessage Insert(TrackCourseRequest model)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            ItemResponse<int> response = new ItemResponse<int>();
            response.Item = _trackCourseService.Insert(model);
            return Request.CreateResponse(response);
        }
        public int Insert(TrackCourseRequest model)
        {
            var trackId = 0;

            DataProvider.ExecuteNonQuery(GetConnection, "dbo.TrackCourses_Insert",
                inputParamMapper: delegate(SqlParameterCollection parameterCollection)
                {

                    parameterCollection.AddWithValue("@TracksId", model.CourseId);
                    parameterCollection.AddWithValue("@Order", model.Order);

                },

                returnParameters:delegate (SqlParameterCollection para)
                {
                    int.TryParse(para["@TracksId"].Value.ToString(), out trackId);
                });

            return trackId;
        }