public IHttpActionResult PutUserByProject(int id, UserByProject userByProject)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetUserByProject(int id)
        {
            UserByProject userByProject = db.UsersByProjects.Find(id);

            if (userByProject == null)
            {
                return(NotFound());
            }

            return(Ok(userByProject));
        }
        public IHttpActionResult PostUserByProject(UserByProject userByProject)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.UsersByProjects.Add(userByProject);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = userByProject.ID }, userByProject));
        }
        public IHttpActionResult DeleteUserByProject(int id)
        {
            UserByProject userByProject = db.UsersByProjects.Find(id);

            if (userByProject == null)
            {
                return(NotFound());
            }

            db.UsersByProjects.Remove(userByProject);
            db.SaveChanges();

            return(Ok(userByProject));
        }