public void SaveBudgetTrack(int Total, int Rent, int Bills, int Food, int Saving, int Miscellaneous, int UserId) { BudgetTrack budgetTrack; User user; user = LoadUserById(UserId); budgetTrack = new BudgetTrack(Total, Rent, Bills, Food, Saving, Miscellaneous); budgetTrack.user = user; budgetTracks.Add(budgetTrack); }
public BudgetTrack LoadBudgetTrack(int id) { BudgetTrack budgetTrack = new BudgetTrack(); IEnumerable <BudgetTrack> op = from o in data.BudgetTracks where o.Id.Equals(id) orderby o.Id descending select o; foreach (BudgetTrack bu in op) { budgetTrack = bu; } return(budgetTrack); }