public async Task <ActionResult <VoyFileLookUp> > PostVoyFileLookUp(VoyFileLookUp voyFileLookUp) { _context.VoyFileLookUps.Add(voyFileLookUp); await _context.SaveChangesAsync(); return(CreatedAtAction("GetVoyFileLookUp", new { id = voyFileLookUp.VoyFileLookUpId }, voyFileLookUp)); }
public async Task <IActionResult> PutVoyFileLookUp(int id, VoyFileLookUp voyFileLookUp) { if (id != voyFileLookUp.VoyFileLookUpId) { return(BadRequest()); } _context.Entry(voyFileLookUp).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VoyFileLookUpExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }