Exemplo n.º 1
0
 public static IQueryable<Pmta> GetPmtasByDeliveryGroup(IPmtaRepository pmtaRepository, DeliveryGroup deliveryGroup)
 {
     return (from dsi in pmtaRepository.GetDeliveryServerIps()
             where dsi.deliveryserver_id.HasValue && dsi.deliverygroup_id.HasValue && dsi.deliverygroup_id == deliveryGroup.deliverygroup_id
             join pmta in pmtaRepository.GetAll() on dsi.deliveryserver_id equals pmta.deliveryserver_id
             select pmta).Distinct();
 }
Exemplo n.º 2
0
 public static IQueryable<int> GetDeliveryServerIdsForMonitoredDeliveryGroups(IPmtaRepository pmtaRepository, IDeliveryGroupRepository deliveryGroupRepository)
 {
     return (from dsi in pmtaRepository.GetDeliveryServerIps()
             where dsi.deliveryserver_id.HasValue && dsi.deliverygroup_id.HasValue && dsi.enabled && dsi.DeliveryServer.enabled
             join dvg in DeliveryGroup.GetMonitored(deliveryGroupRepository).Where(d => d.CancelOnBulkingEnabled) on dsi.deliverygroup_id equals dvg.deliverygroup_id
             select dsi.deliveryserver_id.Value).Distinct();
 }
Exemplo n.º 3
0
        public static IQueryable<IGrouping<int, DeliveryServerIp>> GetVmtasGroupedByDeliveryServerForDeliveryGroup(IPmtaRepository pmtaRepository, DeliveryGroup deliveryGroup)
        {

            return from dsi in pmtaRepository.GetDeliveryServerIps()
                   where dsi.deliveryserver_id.HasValue && dsi.deliverygroup_id.HasValue && dsi.deliverygroup_id == deliveryGroup.deliverygroup_id && dsi.enabled && dsi.DeliveryServer.enabled
                   group dsi by dsi.deliveryserver_id.Value into g
                   select g;
        }