public StaffGroupDetail CreateDetail(StaffGroup staffGroup, IPersistenceContext context) { StaffAssembler staffAssembler = new StaffAssembler(); WorklistAssembler worklistAssembler = new WorklistAssembler(); IList <Worklist> worklists = context.GetBroker <IWorklistBroker>().Find(staffGroup); return(new StaffGroupDetail( staffGroup.GetRef(), staffGroup.Name, staffGroup.Description, staffGroup.Elective, CollectionUtils.Map <Staff, StaffSummary>(staffGroup.Members, delegate(Staff staff) { return staffAssembler.CreateStaffSummary(staff, context); }), CollectionUtils.Map <Worklist, WorklistSummary>(worklists, delegate(Worklist worklist) { return worklistAssembler.GetWorklistSummary(worklist, context); }), staffGroup.Deactivated )); }
public StaffGroupSummary CreateSummary(StaffGroup staffGroup) { return(new StaffGroupSummary( staffGroup.GetRef(), staffGroup.Name, staffGroup.Description, staffGroup.Elective, staffGroup.Deactivated)); }