public async Task<IHttpActionResult> PutJobType(string id, JobType jobType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

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

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

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!JobTypeExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
        //Populates the JobType table
        private void PopulateJobType()
        {
            JobType heltid = new JobType()
            {
                id = "heltid",
                name = "Heltid",
                type = "job"
            };

            JobType praksis = new JobType()
            {
                id = "praksis",
                name = "Praksis/Internship",
                type = "job"
            };


            JobType deltid = new JobType()
            {
                id = "deltid",
                name = "Deltid",
                type = "job"
            };

            JobType sommerjobb = new JobType()
            {
                id = "sommerjobb",
                name = "Sommerjobb",
                type = "job"
            };

            JobType stipend = new JobType()
            {
                id = "stipend",
                name = "Stipend",
                type = "job"
            };

            JobType trainee = new JobType()
            {
                id = "trainee",
                name = "Trainee",
                type = "job"
            };

            JobType fagl = new JobType()
            {
                id = "faglærer",
                name = "Fra faglærer",
                type = "project",
            };

            JobType stud = new JobType()
            {
                id = "student",
                name = "Fra student",
                type = "project",
            };
            

            JobType virksomhet = new JobType()
            {
                id = "virksomhet",
                name = "Fra virksomhet",
                type = "project",
            };


            db.jobTypes.Add(heltid);
            db.jobTypes.Add(deltid);
            db.jobTypes.Add(fagl);
            db.jobTypes.Add(virksomhet);
            db.jobTypes.Add(praksis);
            db.jobTypes.Add(trainee);
            db.jobTypes.Add(stipend);
            db.jobTypes.Add(sommerjobb);
            db.jobTypes.Add(stud);
            db.SaveChanges();

        }
        public async Task<IHttpActionResult> PostJobType(JobType jobType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.jobTypes.Add(jobType);

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (JobTypeExists(jobType.id))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

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