private static void CreateUpdUserPortfolioSelection(ApplicationDbContext context, int custId) { var confRepo = new ConfRepo(context); var custPortfolioRepo = new UserPortfolioRepo( context, confRepo, new UserRepo(context)); custPortfolioRepo.SetDbUserMonthsPortfolioMix(custId, RiskToleranceEnum.Low, 2015, 1, new DateTime(2015, 1, 1)); }
private void SetDbMonthlyPortfolioSelection(int monthsCnt, int userId, string startYearMonthStr) { var monthPortfolioRisk = monthsCnt % 3 == 0 ? RiskToleranceEnum.Low : monthsCnt % 3 == 1 ? RiskToleranceEnum.Medium : RiskToleranceEnum.High; // Create loss transaction for the month cpRepo.SetDbUserMonthsPortfolioMix( userId, monthPortfolioRisk, DbExpressions.GetYear(startYearMonthStr), DbExpressions.GetMonth(startYearMonthStr), DateTime.UtcNow); }