public ActionResult Addtype(PhotoGrapherPhotoGraphyType pyped) { ph.AddPhotoGraphy_Type(pyped); TempData["msg"] = "<script>alert('Add PhotoGraphyType Successfully');</script>"; return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri)); }
public bool AddPhotoGraphy_Type(PhotoGrapherPhotoGraphyType Add_Type) { Db.Set <PhotoGrapherPhotoGraphyType>().Add(Add_Type); Db.SaveChanges(); return(true); }
public bool UpdatePhotoGraphy_Type(PhotoGrapherPhotoGraphyType UpType, int id) { var find_single_type = Db.Set <PhotoGrapherPhotoGraphyType>().Find(id); if (find_single_type != null) { Db.Entry(UpType).State = EntityState.Modified; Db.SaveChanges(); return(true); } else { return(false); } }