private bool LoadByPrimaryKeyDynamic(System.Int32 id)
        {
            ShippingServiceRateTypeQuery query = new ShippingServiceRateTypeQuery();

            query.Where(query.Id == id);
            return(this.Load(query));
        }
예제 #2
0
        public static ShippingServiceRateType Find(int shippingServiceId, string name)
        {
            var q = new ShippingServiceRateTypeQuery();

            q.Where(q.ShippingServiceId == shippingServiceId, q.Name == name);

            ShippingServiceRateType shippingMethod = new ShippingServiceRateType();

            return(shippingMethod.Load(q) ? shippingMethod : null);
        }
예제 #3
0
        public List <ShippingServiceRateType> GetAllRateTypes()
        {
            //List<ShippingServiceRateType> rateTypes = this.ShippingServiceRateTypeCollectionByShippingServiceId;
            //rateTypes.Sort((left, right) => left.DisplayName.CompareTo(right.DisplayName));
            //return rateTypes;

            var q = new ShippingServiceRateTypeQuery();

            q.Where(q.ShippingServiceId == this.Id);
            q.OrderBy(q.SortOrder.Ascending, q.DisplayName.Ascending);

            var collection = new ShippingServiceRateTypeCollection();

            collection.Load(q);

            return(collection.ToList());
        }