public async Task <IActionResult> Edit(int id, [Bind("MummyId,HairTaken,SoftTissueTaken,BoneTaken,ToothTaken,TextileTaken,BurialSampleTaken,DescriptionOfTaken,SampleNum,Sex,SexBodyCol,GefunctionTotal,PreservationNotes,AgeAtDeath,EstimateLivingStature,BodyAnalysis,SexBurialMethod,FaceBundle")] PostExhumationDatum postExhumationDatum) { if (id != postExhumationDatum.MummyId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(postExhumationDatum); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PostExhumationDatumExists(postExhumationDatum.MummyId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["MummyId"] = new SelectList(_context.Mummies, "MummyId", "MummyId", postExhumationDatum.MummyId); return(View(postExhumationDatum)); }
public async Task <IActionResult> Create([Bind("MummyId,HairTaken,SoftTissueTaken,BoneTaken,ToothTaken,TextileTaken,BurialSampleTaken,DescriptionOfTaken,SampleNum,Sex,SexBodyCol,GefunctionTotal,PreservationNotes,AgeAtDeath,EstimateLivingStature,BodyAnalysis,SexBurialMethod,FaceBundle")] PostExhumationDatum postExhumationDatum) { if (ModelState.IsValid) { _context.Add(postExhumationDatum); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["MummyId"] = new SelectList(_context.Mummies, "MummyId", "MummyId", postExhumationDatum.MummyId); return(View(postExhumationDatum)); }