public static List <FundDTO> GetList() { DB db = new DB(); List <FundDTO> list = new List <FundDTO>(); foreach (Fund fund in db.Funds) { list.Add(FundConvert.DALtoDTO(fund)); } return(list); }
public static FundDTO GetById(string id) { FundDTO Fund = new FundDTO(); DB db = new DB(); foreach (Fund fund in db.Funds) { if (fund.FundId == id) { Fund = FundConvert.DALtoDTO(fund); Fund.Futurbalance = GetFutureBalance(id, DateTime.Now.AddMonths(1)); return(Fund); } } return(null); }