public IActionResult Trending(Category category) { var trendsByFunds = _projectService.GetTrendsByFunds().ToList(); var trendsByFunders = _projectService.GetTrendsByFunders().ToList(); var trendsByCategory = _projectService.GetTrendsByCategory(category).ToList(); if (trendsByFunds == null) { return(null); } if (trendsByFunders == null) { return(null); } trendsByFunds.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); trendsByFunders.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); trendsByCategory.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); var TrendingsViewModel = new TrendingViewModel() { GetTrendsByFunders = trendsByFunders, GetTrendsByFunds = trendsByFunds, GetTrendsByCategory = trendsByCategory }; return(View(TrendingsViewModel)); }
public IActionResult Details(int id) { var project = _projectService.GetById(id); ExtraMethod.ConvertToRawHtml(project.Description); project.FundingPackages.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); return(View(project)); }
public IEnumerable <Project> GetTrendsByFunders() { var projects = context_.Set <Project>() .Include(u => u.UserBackers) .OrderByDescending(p => p.FundsReceivedCounter) .ToList(); projects.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); return(projects); }
public IEnumerable <Project> GetTrendsByFunds() { var projects = context_.Set <Project>() .Include(u => u.UserCreator) .OrderByDescending(p => p.CurrentFund) .ToList(); projects.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); return(projects); }
public IEnumerable <Project> GetAll() { var projects = context_.Set <Project>() .Include(u => u.UserCreator) .Include(fd => fd.FundingPackages).ToList(); projects.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); return(projects); }
public IEnumerable <Project> GetTrendsByCategory(Category category) { var projects = context_.Set <Project>() .Include(u => u.UserBackers) .Where(p => p.Category == category) .OrderByDescending(p => p.CurrentFund) .ToList(); projects.ForEach(p => p.Description = ExtraMethod.ConvertToRawHtml(p.Description)); return(projects); }
public void SetExtraMethod(ExtraMethod extra) { this.extra = extra; }