public async Task <IActionResult> PutEgeoMappings(long id, EgeoMappings egeoMappings) { if (id != egeoMappings.EgeoMappingsId) { return(BadRequest()); } _context.Entry(egeoMappings).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EgeoMappingsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <EgeoMappings> > PostEgeoMappings(EgeoMappings egeoMappings) { _context.EgeoMappings.Add(egeoMappings); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (EgeoMappingsExists(egeoMappings.EgeoMappingsId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetEgeoMappings", new { id = egeoMappings.EgeoMappingsId }, egeoMappings)); }