private bool LoadByPrimaryKeyDynamic(System.Int32 storeId, System.Int16 paymentProviderId)
        {
            StorePaymentProviderQuery query = new StorePaymentProviderQuery();

            query.Where(query.StoreId == storeId, query.PaymentProviderId == paymentProviderId);
            return(this.Load(query));
        }
        public static StorePaymentProvider GetOrCreate(int storeId, short providerId)
        {
            // check if the StorePaymentProvider exists...if not, create it
            StorePaymentProviderQuery q = new StorePaymentProviderQuery();

            q.Where(q.StoreId == storeId, q.PaymentProviderId == providerId);

            StorePaymentProvider storeProvider = new StorePaymentProvider();

            if (!storeProvider.Load(q))
            {
                storeProvider.StoreId           = storeId;
                storeProvider.PaymentProviderId = providerId;
                storeProvider.Save();
            }

            return(storeProvider);
        }