Ejemplo n.º 1
0
        private static async Task <List <FundStyleExposure> > GetFundStyleExposures2(string fundCode, DateTime begin, DateTime end)
        {
            var exposures = new List <FundStyleExposure>();

            while (begin <= end)
            {
                var exposure = await GetStyleExposure(fundCode, begin);

                if (exposure != null)
                {
                    exposures.Add(exposure);
                }
                begin = begin.AddDays(1);
            }
            if (exposures.Any())
            {
                DataDao.InsertFundStyleExposures(exposures);
            }
            return(exposures);
        }