public ActionResult AddExp(PhotoGrapherExperience exp) { ph.AddExperience(exp); TempData["msg"] = "<script>alert('Add Experience Successfully');</script>"; return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri)); }
//Add Experience public bool AddExperience(PhotoGrapherExperience Exp) { Db.Set <PhotoGrapherExperience>().Add(Exp); Db.SaveChanges(); return(true); }
//Update Experience public bool UpdateExperience(PhotoGrapherExperience ExpUpdate, int id) { var find_single_Exp = Db.Set <PhotoGrapherExperience>().Find(id); if (find_single_Exp != null) { Db.Entry(ExpUpdate).State = EntityState.Modified; Db.SaveChanges(); return(true); } else { return(false); } }