internal static TerminationChoiceDto GetTerminationChoice(Rbr_Db pDb, int pTerminationChoiceId)
        {
            var _terminationChoiceRow = pDb.TerminationChoiceCollection.GetByPrimaryKey(pTerminationChoiceId);
            var _route = CarrierRouteManager.Get(pDb, _terminationChoiceRow.Carrier_route_id);

            return(mapToTerminationChoice(_terminationChoiceRow, _route));
        }
        internal static TerminationChoiceDto[] GetAll(Rbr_Db pDb, int pRoutingPlanId, int pRouteId)
        {
            var _list = new List <TerminationChoiceDto>();
            var _terminationChoiceRows = pDb.TerminationChoiceCollection.GetByRoutingPlanIdRouteId_OrderByPriority(pRoutingPlanId, pRouteId);

            foreach (var _terminationChoiceRow in _terminationChoiceRows)
            {
                var _route = CarrierRouteManager.Get(pDb, _terminationChoiceRow.Carrier_route_id);
                _list.Add(mapToTerminationChoice(_terminationChoiceRow, _route));
            }
            return(_list.ToArray());
        }