public ActionResult DeleteConfirm(string hashTag)
{
var conference = YouConfDbContext.Conferences
.FirstOrDefault(x => x.HashTag == hashTag);
var id = conference.Id;
if (conference == null)
{
return HttpNotFound();
}
if (!IsCurrentUserAuthorizedToAdministerConference(conference))
{
return HttpUnauthorized();
}
conference.Speakers.ToList().ForEach(x => x.Presentations.Clear());
YouConfDbContext.Conferences.Remove(conference);
YouConfDbContext.SaveChanges();
UpdateConferenceInSolrIndex(conference.Id, Common.Messaging.SolrIndexAction.Delete);
return RedirectToAction("All");
}