public CategoryReport(SummaryNature nature, IList <Summary> summaryList) { Nature = nature; List = summaryList .Select(s => new CategoryValue(s)) .OrderBy(i => i.Category) .ToList(); }
private void create(Account account, Category category, Int32 time, SummaryNature nature) { var summary = new Summary { Account = account, Category = category, Time = time, Nature = nature, Broken = true, }; SaveOrUpdate(summary); }
private void @break(Account account, Category category, Int32 time, SummaryNature nature) { var summary = Get(account, category, time); if (summary == null) { create(account, category, time, nature); } else { @break(summary); } }