dfmmalaw
5/15/2017 - 6:27 PM

Returns views that are assigned to candidates using join and distinct properties

Returns views that are assigned to candidates using join and distinct properties

public IEnumerable<ClientView> findViewsAssignedToCandidates(List<long> volPoolIds, long clientId)
        {
            var clientViews =
                (from cv in db.ClientViews
                join vpcv in db.VolunteerPoolClientViews on cv.ClientViewId equals vpcv.ClientViewId
                where volPoolIds.Contains(vpcv.VolunteerPoolId) 
                orderby cv.Name
                select cv).Distinct();
            return clientViews;
        }