public IEnumerable <ReportProfitItem> GetProfitData() { return(from a in accounts join p in allocations on a.Id equals p.AccountId select new ReportProfitItem { Account = AccountConverter.ConvertToDomain(a), Allocation = AllocationConverter.ConvertToDomain(p), WorkDoneMargin = GetWorkDoneMargin(a.Id, GetMonthStart(p.Month)) }); }
public object GetAvailability() { return(from ai in allocations where (bool)ai.Active select AllocationConverter.ConvertToDomain(ai)); }