public async Task <IActionResult> Edit(int id, [Bind("Id,NumuneAlisTarihi,TeslimAlinan,TeslimAlan,NumuneIsim,NumuneKodu,NumuneTuru,NumuneKurum,DiagenNukleikAsidKodu,EkstraksiyonTarihi,YapanKisi,Yontem,KullanilanKit,Aciklama")] SampleExtraction sampleExtraction) { if (id != sampleExtraction.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sampleExtraction); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SampleExtractionExists(sampleExtraction.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sampleExtraction)); }
public async Task <IActionResult> Create([Bind("Id,NumuneAlisTarihi,TeslimAlinan,TeslimAlan,NumuneIsim,NumuneKodu,NumuneTuru,NumuneKurum,DiagenNukleikAsidKodu,EkstraksiyonTarihi,YapanKisi,Yontem,KullanilanKit,Aciklama")] SampleExtraction sampleExtraction) { if (ModelState.IsValid) { _context.Add(sampleExtraction); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sampleExtraction)); }