public async Task <IActionResult> PutEderailers(long id, Ederailers ederailers) { if (id != ederailers.EderailersId) { return(BadRequest()); } _context.Entry(ederailers).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EderailersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Ederailers> > PostEderailers(Ederailers ederailers) { _context.Ederailers.Add(ederailers); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (EderailersExists(ederailers.EderailersId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetEderailers", new { id = ederailers.EderailersId }, ederailers)); }