public async Task <ActionResult> Index() { MutualFundService service = new MutualFundService(); List <FundInfo> funds = await service.GetAllFunds(); return(View(funds)); }
public async Task <ActionResult> OneTimeInvestment(FundPurchased fund) { MutualFundService service = new MutualFundService(); await service.Add(fund); return(RedirectToAction("Index", "Home")); }
public Result <MutualFund> Get(int id) { var result = new Result <MutualFund>(); MutualFundService mutualFundService = new MutualFundService(); result.Value = mutualFundService.Get(id); result.IsSuccess = true; return(result); }
public Result <IList <MutualFund> > GetAll(int plannerId) { var result = new Result <IList <MutualFund> >(); MutualFundService mutualFundService = new MutualFundService(); result.Value = mutualFundService.GetAll(plannerId); result.IsSuccess = true; return(result); }
public Result Delete(MutualFund mf) { var result = new Result(); try { MutualFundService mutualFundService = new MutualFundService(); mutualFundService.Delete(mf); result.IsSuccess = true; } catch (Exception exception) { result.IsSuccess = false; result.ExceptionInfo = exception; } return(result); }