private IEnumerable <ParticipationViewModel> FetchParticipationsByShooter(Shooter shooter) { ServiceDeskConfiguration sdk = ServiceLocator.Current.GetInstance <ServiceDeskConfiguration>(); ParticipationDescriptionCollection participations = sdk.ParticipationDescriptions; return(from shooterParticipation in _shooterParticipationDataStore.FindByShooterId(shooter.ShooterId) join participation in participations.GetAll() on shooterParticipation.ProgramNumber.ToString() equals participation.ProgramNumber orderby participation.ProgramNumber select new ParticipationViewModel { ProgramName = participation.ProgramName, ProgramNumber = shooterParticipation.ProgramNumber }); }
private IEnumerable <GroupingViewModel> FetchGroupsByShooter(Shooter shooter) { ServiceDeskConfiguration sdk = ServiceLocator.Current.GetInstance <ServiceDeskConfiguration>(); ParticipationDescriptionCollection participations = sdk.ParticipationDescriptions; return(from collectionShooter in _collectionShooterDataStore.FindByShooterId(shooter.ShooterId) join shooterCollection in _shooterCollectionDataStore.GetAll() on collectionShooter.ShooterCollectionId equals shooterCollection.ShooterCollectionId join participation in participations.GetAll() on shooterCollection.ProgramNumber.ToString() equals participation.ProgramNumber orderby shooterCollection.CollectionName select new GroupingViewModel { ShooterCollectionId = collectionShooter.CollectionShooterId, GroupingName = shooterCollection.CollectionName, ParticipationName = participation.ProgramName }); }