public IHttpActionResult PostUser_InvestIntention(user_investintention user_InvestIntention)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            if (User_InvestIntentionExists(user_InvestIntention.code))
            {
                db.Entry(user_InvestIntention).State = EntityState.Modified;
            }
            else
            {
                db.user_investintention.Add(user_InvestIntention);
            }

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                throw;
            }

            return(Ok());
        }
        public IHttpActionResult PutUser_InvestIntention(string id, user_investintention user_InvestIntention)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetUser_InvestIntention(string id)
        {
            user_investintention user_InvestIntention = db.user_investintention.Find(id);

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

            return(Ok(user_InvestIntention));
        }
        public IHttpActionResult DeleteUser_InvestIntention(string id)
        {
            user_investintention user_InvestIntention = db.user_investintention.Find(id);

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

            db.user_investintention.Remove(user_InvestIntention);
            db.SaveChanges();

            return(Ok(user_InvestIntention));
        }