public ActionResult DeleteConfirmed(Guid id)
 {
     Podcast.Models.Podcast podcast = db.Podcasts.Find(id);
     db.Podcasts.Remove(podcast);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit([Bind(Include = "Id,Video,Text,Timestamp,Speaker")] Podcast.Models.Podcast podcast)
 {
     if (ModelState.IsValid)
     {
         db.Entry(podcast).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(podcast));
 }
 public ActionResult Create([Bind(Include = "Id,Video,Text,Timestamp,Speaker")] Podcast.Models.Podcast podcast)
 {
     if (ModelState.IsValid)
     {
         podcast.Timestamp = DateTime.Now;
         podcast.Id        = Guid.NewGuid();
         db.Podcasts.Add(podcast);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(podcast));
 }
 // GET: Podcasts/Delete/5
 public ActionResult Delete(Guid?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     Podcast.Models.Podcast podcast = db.Podcasts.Find(id);
     if (podcast == null)
     {
         return(HttpNotFound());
     }
     return(View(podcast));
 }