public async Task <ActionResult> DeleteConfirmed(int id)
        {
            JenkinsJobEntity jenkinsJobEntity = await db.JenkinsJobEntities.FindAsync(id);

            db.JenkinsJobEntities.Remove(jenkinsJobEntity);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,ServiceName,StartTime,EndTime,LaterTime,BuildNumber,Status")] JenkinsJobEntity jenkinsJobEntity)
        {
            if (ModelState.IsValid)
            {
                db.Entry(jenkinsJobEntity).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(jenkinsJobEntity));
        }
        // GET: JenkinsJob/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JenkinsJobEntity jenkinsJobEntity = await db.JenkinsJobEntities.FindAsync(id);

            if (jenkinsJobEntity == null)
            {
                return(HttpNotFound());
            }
            return(View(jenkinsJobEntity));
        }
        //// GET: api/JenkinsJob
        //public IEnumerable<string> Get()
        //{
        //    return new string[] { "value1", "value2" };
        //}

        //// GET: api/JenkinsJob/5
        //public string Get(int id)
        //{
        //    return "value";
        //}


        //// POST: api/JenkinsJob
        //public void Post([FromBody]string value)
        //{

        //}

        // POST:
        public async Task <HttpResponseMessage> Post([FromBody] JenkinsJobEntity job)
        {
            try
            {
                db.JenkinsJobEntities.Add(job);
                await db.SaveChangesAsync();

                return(new HttpResponseMessage(HttpStatusCode.OK)
                {
                    Content = new StringContent("Operation is success", System.Text.Encoding.UTF8, "text/plain")
                });
            }
            catch (Exception ex)
            {
                return(new HttpResponseMessage(HttpStatusCode.ExpectationFailed)
                {
                    Content = new StringContent("Add jenkins job record data failed", System.Text.Encoding.UTF8, "text/plain")
                });
            }
        }