public static List <IncomeSource> GetIncomeSources(long accountId = 0) { if (IncomeSources == null || !IncomeSources.Any()) { IncomeSources = IncomeSourceRepository.GetAllIncomeSources(); } return(IncomeSources); }
public static void AddIncomeSource(string name) { if (IncomeSources.Any(c => c.Name == name)) { return; } IncomeSourceRepository.CreateIncomeSource(name); IncomeSources = IncomeSourceRepository.GetAllIncomeSources(); }
static IncomeSourceHelper() { IncomeSources = IncomeSourceRepository.GetAllIncomeSources(); }