public GetMappedLocationsByGeofences ( List |
||
geofences | List |
The geofences. |
return | IQueryable |
/// <summary> /// Gets the family groups that are geofenced by any of the selected geofences /// </summary> /// <param name="geofences">The geofences.</param> /// <returns></returns> public IQueryable <Group> GetGeofencedFamilies(List <DbGeography> geofences) { var rockContext = (RockContext)this.Context; var groupLocationService = new GroupLocationService(rockContext); Guid familyTypeGuid = Rock.SystemGuid.GroupType.GROUPTYPE_FAMILY.AsGuid(); return(groupLocationService.GetMappedLocationsByGeofences(geofences) .Where(l => l.Group != null && l.Group.GroupType != null && l.Group.GroupType.Guid.Equals(familyTypeGuid)) .Select(l => l.Group)); }
/// <summary> /// Gets the family groups that are geofenced by any of the selected geofences /// </summary> /// <param name="geofences">The geofences.</param> /// <returns></returns> public IQueryable<Group> GetGeofencedFamilies( List<DbGeography> geofences ) { var rockContext = (RockContext)this.Context; var groupLocationService = new GroupLocationService( rockContext ); Guid familyTypeGuid = Rock.SystemGuid.GroupType.GROUPTYPE_FAMILY.AsGuid(); return groupLocationService.GetMappedLocationsByGeofences( geofences ) .Where( l => l.Group != null && l.Group.GroupType != null && l.Group.GroupType.Guid.Equals( familyTypeGuid ) ) .Select( l => l.Group ); }