public IHttpActionResult GetByPid(int id)
        {
            List <PortfolioHistory> p = PortfolioHistoryDao.getPortfolioHistorysByPId(id);

            if (p != null)
            {
                return(Ok(p));
            }
            else
            {
                return(NotFound());
            }
        }
        public IHttpActionResult GetOnePortfolioHis(int portid)
        {
            List <PortfolioHistory> p    = PortfolioHistoryDao.getPortfolioHistorysByPId(portid);
            List <double>           pnl  = new List <double>();
            List <string>           time = new List <string>();

            foreach (PortfolioHistory record in p)
            {
                pnl.Add(record.PNL);
                time.Add(record.Date.ToString("D"));
            }

            return(Ok(new OnePortfolioResult(time, pnl)));
        }