public async Task <IActionResult> Putcheck(int id, check check) { if (id != check.checkId) { return(BadRequest()); } _context.Entry(check).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!checkExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Putmyfoods(int id, myfoods myfoods) { if (id != myfoods.myfoodsId) { return(BadRequest()); } _context.Entry(myfoods).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!myfoodsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Create([Bind("azizId,azizName")] aziz aziz) { if (ModelState.IsValid) { _context.Add(aziz); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(aziz)); }
public async Task <IActionResult> Create([Bind("noriId,noriName")] nori nori) { if (ModelState.IsValid) { _context.Add(nori); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(nori)); }
public async Task <IActionResult> Create([Bind("checkId,checkName")] check check) { if (ModelState.IsValid) { _context.Add(check); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(check)); }