public async Task <ActionResult <dtInvVoucherEntry> > PostdtInvVoucherEntry(dtInvVoucherEntry dtInvVoucherEntry) { _context.dtInvVoucherEntry.Add(dtInvVoucherEntry); await _context.SaveChangesAsync(); return(CreatedAtAction("GetdtInvVoucherEntry", new { id = dtInvVoucherEntry.ID }, dtInvVoucherEntry)); }
public async Task <IActionResult> PutdtInvVoucherEntry(long id, dtInvVoucherEntry dtInvVoucherEntry) { if (id != dtInvVoucherEntry.ID) { return(BadRequest()); } _context.Entry(dtInvVoucherEntry).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!dtInvVoucherEntryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }