public IHttpActionResult PostJob_Board_Table(Job_Board_Table job_Board_Table) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.Job_Board_Table.Add(job_Board_Table); try { db.SaveChanges(); } catch (DbUpdateException) { if (Job_Board_TableExists(job_Board_Table.Job_Id)) { return Conflict(); } else { throw; } } return CreatedAtRoute("DefaultApi", new { id = job_Board_Table.Job_Id }, job_Board_Table); }
public IHttpActionResult PutJob_Board_Table(decimal id, Job_Board_Table job_Board_Table) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != job_Board_Table.Job_Id) { return BadRequest(); } db.Entry(job_Board_Table).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!Job_Board_TableExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); }