Ejemplo n.º 1
0
        public async Task <ActionResult <List <FundingResponse> > > Get()
        {
            var fundings = await _fundingService.GetAll();

            return(fundings.Select(f => new FundingResponse
            {
                Id = f.Id,
                InvestmentStatus = f.IsFoundedByMe ? "Already Founded" : "Investment required",
                Description = f.Description,
                TypeOfInvestment = f.TypeOfInvestment,
                InvestmentCompany = f.InvestmentCompany,
                StartTime = f.StartTime.ToShortDateString(),
                EndTime = f.EndTime.ToShortDateString(),
                IsFoundedByMe = f.IsFoundedByMe
            }).ToList());
        }