public async Task<IHttpActionResult> PosttargetState(project_target_states model, int projectId)
        {
            if (!ModelState.IsValid)
                return BadRequest();

            bool updated = _repo.UpdatetargetState(model, projectId);


            if (updated == true)
                return Ok();

            model.Project_FK = projectId;
            db.project_target_states.Add(model);

            await db.SaveChangesAsync();

            return Ok();
        }
        public bool UpdatetargetState(project_target_states model, int projectId)
        {
            var query = (from m in db.project_target_states
                         where m.Project_FK == projectId
                         select m).AsQueryable();

            if (query.Count() == 0)
                return false;

            project_target_states newDescription = query.First<project_target_states>();
            newDescription.content = model.content;
            db.Entry(newDescription).State = EntityState.Modified;
            db.SaveChanges();
            return true;
        }