コード例 #1
0
 public ActionResult Edit([Bind(Include = "ProjectId,ProjectName,ProjectDescription,ProjectScreenshot,ProjectGitHub")] Project project)
 {
     if (ModelState.IsValid)
     {
         db.Entry(project).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(project));
 }
コード例 #2
0
 public ActionResult Edit(Portfolio portfolio)
 {
     if (ModelState.IsValid)
     {
         db.Entry(portfolio).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(portfolio));
 }