public async Task <IActionResult> PutTemporaryInAndOutİtems(int id, TemporaryInAndOutItems temporaryInAndOutItems) { if (id != temporaryInAndOutItems.Id) { return(BadRequest()); } temporaryInAndOutItems.Status = true; _context.Entry(temporaryInAndOutItems).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TemporaryInAndOutİtemsExists(id)) { return(NotFound()); } else { throw; } } return(Ok()); }
public async Task <ActionResult> PostTemporaryInAndOutİtems(TemporaryInAndOutItems temporaryInAndOutItems) { temporaryInAndOutItems.Status = true; _context.TemporaryInAndOutItems.Add(temporaryInAndOutItems); await _context.SaveChangesAsync(); return(StatusCode(201)); }