public async Task <IActionResult> PutORDERL(string id, ORDERL oRDERL) { if (id != oRDERL.ORDERLID) { return(BadRequest()); } _context.Entry(oRDERL).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ORDERLExists(id)) { return(NotFound()); } else { throw; } } return(Ok()); }
public async Task <ActionResult <ORDERL> > PostORDERL(ORDERL oRDERL) { _context.ORDERL.Add(oRDERL); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (ORDERLExists(oRDERL.ORDERLID)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetORDERL", new { id = oRDERL.ORDERLID }, oRDERL)); }