public async Task <IActionResult> PutMedcinesInDrugstores(int id, MedcinesInDrugstores medcinesInDrugstores) { if (id != medcinesInDrugstores.id) { return(BadRequest()); } _context.Entry(medcinesInDrugstores).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MedcinesInDrugstoresExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutOrders(int id, Orders orders) { if (id != orders.id) { return(BadRequest()); } _context.Entry(orders).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrdersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }