public ActionResult DeleteConfirmed(int id) { PodCasts podCasts = db.PodCasts.Find(id); db.PodCasts.Remove(podCasts); db.SaveChanges(); return(RedirectToAction("Index")); }
public void AddPodCast(PodCast podCast) { if (PodCasts == null) { PodCasts = new List <PodCast>(); } PodCasts.Add(podCast); }
public ActionResult Edit([Bind(Include = "Identificador,emisora,programa,participantes,duracion,fecha,tematica,precio")] PodCasts podCasts) { string currentUserId = User.Identity.GetUserId(); podCasts.UserId = currentUserId; if (ModelState.IsValid) { db.Entry(podCasts).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(podCasts)); }
// GET: PodCasts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PodCasts podCasts = db.PodCasts.Find(id); string currentUserId = User.Identity.GetUserId(); if (((podCasts.UserId != currentUserId) || podCasts == null)) { return(HttpNotFound()); } return(View(podCasts)); }
public override int GetHashCode() { unchecked { var hashCode = PlayListID; hashCode = (hashCode * 397) ^ Name.GetHashCode(); hashCode = (hashCode * 397) ^ Master.GetHashCode(); hashCode = (hashCode * 397) ^ PlayListID.GetHashCode(); hashCode = (hashCode * 397) ^ PlaylistPersistentID.GetHashCode(); hashCode = (hashCode * 397) ^ ParentPersistentID.GetHashCode(); hashCode = (hashCode * 397) ^ Visible.GetHashCode(); hashCode = (hashCode * 397) ^ AllItems.GetHashCode(); hashCode = (hashCode * 397) ^ DistinguishedKind.GetHashCode(); hashCode = (hashCode * 397) ^ Movies.GetHashCode(); hashCode = (hashCode * 397) ^ TVShows.GetHashCode(); hashCode = (hashCode * 397) ^ PodCasts.GetHashCode(); hashCode = (hashCode * 397) ^ iTunesU.GetHashCode(); hashCode = (hashCode * 397) ^ Audiobooks.GetHashCode(); hashCode = (hashCode * 397) ^ Books.GetHashCode(); hashCode = (hashCode * 397) ^ Folder.GetHashCode(); hashCode = (hashCode * 397) ^ PlaylistItems.GetHashCode(); return(hashCode); } }