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()); }