public async Task <ActionResult> Edit([Bind(Include = "Id,Name,ImageUrl,Latitude,Longitude")] Room room) { if (ModelState.IsValid) { db.Entry(room).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(room)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Rank")] SponsorLevel sponsorLevel) { if (ModelState.IsValid) { db.Entry(sponsorLevel).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(sponsorLevel)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,FirstName,LastName,IsFeatured,Biography,PhotoUrl,AvatarUrl,PositionName,CompanyName,CompanyWebsiteUrl,BlogUrl,TwitterUrl,FacebookProfileName,LinkedInUrl,Email")] Speaker speaker) { if (ModelState.IsValid) { db.Entry(speaker).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(speaker)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,ShortName,Color")] Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(category)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Subtitle,Description,GitHubUrl,BadgeUrl,UnlockCode,Score,Category")] MiniHack miniHack) { if (ModelState.IsValid) { db.Entry(miniHack).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(miniHack)); }
// GET: Sponsors/Details/5 public async Task <ActionResult> Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Sponsor sponsor = await db.Sponsors.FindAsync(id); if (sponsor == null) { return(HttpNotFound()); } await db.Entry(sponsor).Reference("SponsorLevel").LoadAsync(); return(View(sponsor)); }
// GET: Sessions/Details/5 public async Task <ActionResult> Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Session session = await db.Sessions.FindAsync(id); if (session == null) { return(HttpNotFound()); } await db.Entry(session).Collection(s => s.Speakers).LoadAsync(); await db.Entry(session).Collection(c => c.Categories).LoadAsync(); return(View(session)); }