public async Task <ActionResult <mGodownInCharge> > PostmGodownInCharge(mGodownInCharge mGodownInCharge) { _context.MGodownInCharge.Add(mGodownInCharge); await _context.SaveChangesAsync(); return(CreatedAtAction("GetmGodownInCharge", new { id = mGodownInCharge.GdnInch_Id }, mGodownInCharge)); }
public async Task <IActionResult> PutmGodownInCharge(int id, mGodownInCharge mGodownInCharge) { if (id != mGodownInCharge.GdnInch_Id) { return(BadRequest()); } _context.Entry(mGodownInCharge).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!mGodownInChargeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }