public IHttpActionResult PutAssignedWorker(int id, AssignedWorker assignedWorker)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != assignedWorker.AssignedWorkerId)
            {
                return BadRequest();
            }

            db.Entry(assignedWorker).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AssignedWorkerExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
        public IHttpActionResult PostAssignedWorker(AssignedWorker assignedWorker)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.AssignedWorkers.Add(assignedWorker);
            db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = assignedWorker.AssignedWorkerId }, assignedWorker);
        }