public async Task <ActionResult> DeleteConfirmed(int id)
        {
            ReleaseJobEntity releaseJobEntity = await db.ReleaseJobEntities.FindAsync(id);

            db.ReleaseJobEntities.Remove(releaseJobEntity);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        // GET: ReleaseJob/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReleaseJobEntity releaseJobEntity = await db.ReleaseJobEntities.FindAsync(id);

            if (releaseJobEntity == null)
            {
                return(HttpNotFound());
            }
            return(View(releaseJobEntity));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,ReleasePlanEntityId,DeploymentStatus,StartAt,FinishedAt,DeploymentLogPath,DeployServicePath,DeployPackageArchivePath,CreateBy,CreateAt,UpdateBy,UpdateAt")] ReleaseJobEntity releaseJobEntity)
        {
            if (ModelState.IsValid)
            {
                string email = UserManager.GetEmail(User.Identity.GetUserId());
                releaseJobEntity.UpdateAt        = DateTime.Now;
                releaseJobEntity.UpdateBy        = email;
                db.Entry(releaseJobEntity).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.ReleasePlanEntityId = new SelectList(db.ReleasePlanEntities, "Id", "GitRepoTag", releaseJobEntity.ReleasePlanEntityId);
            return(View(releaseJobEntity));
        }
        // GET: ReleaseJob/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReleaseJobEntity releaseJobEntity = await db.ReleaseJobEntities.FindAsync(id);

            if (releaseJobEntity == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ReleasePlanEntityId = new SelectList(db.ReleasePlanEntities, "Id", "GitRepoTag", releaseJobEntity.ReleasePlanEntityId);
            return(View(releaseJobEntity));
        }