public Sales_OrderQuery <Sales_OrderQuery <K, T>, T> JoinBackorderOrder(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Sales_OrderQuery <Sales_OrderQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Orders] AS {1} {0} ON", "{2}.[BackorderOrderID] = {1}.[OrderID]"), o => ((Sales_Order)o)?.BackorderOrder, (e, fv, ppe) => { var child = (Sales_Order)ppe(QueryHelpers.Fill <Sales_Order>(null, fv)); if (e != null) { ((Sales_Order)e).BackorderOrder = child; } return child; } , typeof(Sales_Order), preloadEntities)); }
public Application_PaymentMethodQuery <Sales_CustomerTransactionQuery <K, T>, T> JoinApplication_PaymentMethod(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_PaymentMethodQuery <Sales_CustomerTransactionQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[PaymentMethods] AS {1} {0} ON", "{2}.[PaymentMethodID] = {1}.[PaymentMethodID]"), o => ((Sales_CustomerTransaction)o)?.Application_PaymentMethod, (e, fv, ppe) => { var child = (Application_PaymentMethod)ppe(QueryHelpers.Fill <Application_PaymentMethod>(null, fv)); if (e != null) { ((Sales_CustomerTransaction)e).Application_PaymentMethod = child; } return child; } , typeof(Application_PaymentMethod), preloadEntities)); }
public Application_DeliveryMethodQuery <Purchasing_PurchaseOrderQuery <K, T>, T> JoinApplication_DeliveryMethod(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_DeliveryMethodQuery <Purchasing_PurchaseOrderQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[DeliveryMethods] AS {1} {0} ON", "{2}.[DeliveryMethodID] = {1}.[DeliveryMethodID]"), o => ((Purchasing_PurchaseOrder)o)?.Application_DeliveryMethod, (e, fv, ppe) => { var child = (Application_DeliveryMethod)ppe(QueryHelpers.Fill <Application_DeliveryMethod>(null, fv)); if (e != null) { ((Purchasing_PurchaseOrder)e).Application_DeliveryMethod = child; } return child; } , typeof(Application_DeliveryMethod), preloadEntities)); }
public Sales_InvoiceQuery <Sales_InvoiceLineQuery <K, T>, T> JoinSales_Invoice(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Sales_InvoiceQuery <Sales_InvoiceLineQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Invoices] AS {1} {0} ON", "{2}.[InvoiceID] = {1}.[InvoiceID]"), o => ((Sales_InvoiceLine)o)?.Sales_Invoice, (e, fv, ppe) => { var child = (Sales_Invoice)ppe(QueryHelpers.Fill <Sales_Invoice>(null, fv)); if (e != null) { ((Sales_InvoiceLine)e).Sales_Invoice = child; } return child; } , typeof(Sales_Invoice), preloadEntities)); }
public Application_PeopleQuery <Purchasing_PurchaseOrderQuery <K, T>, T> JoinContactPerson(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_PeopleQuery <Purchasing_PurchaseOrderQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[People] AS {1} {0} ON", "{2}.[ContactPersonID] = {1}.[PersonID]"), o => ((Purchasing_PurchaseOrder)o)?.ContactPerson, (e, fv, ppe) => { var child = (Application_People)ppe(QueryHelpers.Fill <Application_People>(null, fv)); if (e != null) { ((Purchasing_PurchaseOrder)e).ContactPerson = child; } return child; } , typeof(Application_People), preloadEntities)); }
public Application_PeopleQuery <Sales_SpecialDealQuery <K, T>, T> JoinApplication_People(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_PeopleQuery <Sales_SpecialDealQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[People] AS {1} {0} ON", "{2}.[LastEditedBy] = {1}.[PersonID]"), o => ((Sales_SpecialDeal)o)?.Application_People, (e, fv, ppe) => { var child = (Application_People)ppe(QueryHelpers.Fill <Application_People>(null, fv)); if (e != null) { ((Sales_SpecialDeal)e).Application_People = child; } return child; } , typeof(Application_People), preloadEntities)); }
public Sales_CustomerCategoryQuery <Sales_SpecialDealQuery <K, T>, T> JoinSales_CustomerCategory(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Sales_CustomerCategoryQuery <Sales_SpecialDealQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[CustomerCategories] AS {1} {0} ON", "{2}.[CustomerCategoryID] = {1}.[CustomerCategoryID]"), o => ((Sales_SpecialDeal)o)?.Sales_CustomerCategory, (e, fv, ppe) => { var child = (Sales_CustomerCategory)ppe(QueryHelpers.Fill <Sales_CustomerCategory>(null, fv)); if (e != null) { ((Sales_SpecialDeal)e).Sales_CustomerCategory = child; } return child; } , typeof(Sales_CustomerCategory), preloadEntities)); }
public Warehouse_StockGroupQuery <Sales_SpecialDealQuery <K, T>, T> JoinWarehouse_StockGroup(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Warehouse_StockGroupQuery <Sales_SpecialDealQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Warehouse].[StockGroups] AS {1} {0} ON", "{2}.[StockGroupID] = {1}.[StockGroupID]"), o => ((Sales_SpecialDeal)o)?.Warehouse_StockGroup, (e, fv, ppe) => { var child = (Warehouse_StockGroup)ppe(QueryHelpers.Fill <Warehouse_StockGroup>(null, fv)); if (e != null) { ((Sales_SpecialDeal)e).Warehouse_StockGroup = child; } return child; } , typeof(Warehouse_StockGroup), preloadEntities)); }
public Application_TransactionTypeQuery <Warehouse_StockItemTransactionQuery <K, T>, T> JoinApplication_TransactionType(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_TransactionTypeQuery <Warehouse_StockItemTransactionQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[TransactionTypes] AS {1} {0} ON", "{2}.[TransactionTypeID] = {1}.[TransactionTypeID]"), o => ((Warehouse_StockItemTransaction)o)?.Application_TransactionType, (e, fv, ppe) => { var child = (Application_TransactionType)ppe(QueryHelpers.Fill <Application_TransactionType>(null, fv)); if (e != null) { ((Warehouse_StockItemTransaction)e).Application_TransactionType = child; } return child; } , typeof(Application_TransactionType), preloadEntities)); }
public Sales_CustomerQuery <Warehouse_StockItemTransactionQuery <K, T>, T> JoinSales_Customer(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Sales_CustomerQuery <Warehouse_StockItemTransactionQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Customers] AS {1} {0} ON", "{2}.[CustomerID] = {1}.[CustomerID]"), o => ((Warehouse_StockItemTransaction)o)?.Sales_Customer, (e, fv, ppe) => { var child = (Sales_Customer)ppe(QueryHelpers.Fill <Sales_Customer>(null, fv)); if (e != null) { ((Warehouse_StockItemTransaction)e).Sales_Customer = child; } return child; } , typeof(Sales_Customer), preloadEntities)); }
public Application_StateProvinceQuery <Application_CityQuery <K, T>, T> JoinApplication_StateProvince(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_StateProvinceQuery <Application_CityQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[StateProvinces] AS {1} {0} ON", "{2}.[StateProvinceID] = {1}.[StateProvinceID]"), o => ((Application_City)o)?.Application_StateProvince, (e, fv, ppe) => { var child = (Application_StateProvince)ppe(QueryHelpers.Fill <Application_StateProvince>(null, fv)); if (e != null) { ((Application_City)e).Application_StateProvince = child; } return child; } , typeof(Application_StateProvince), preloadEntities)); }
public Application_CityQuery <Application_SystemParameterQuery <K, T>, T> JoinPostalCity(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Application_CityQuery <Application_SystemParameterQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[Cities] AS {1} {0} ON", "{2}.[PostalCityID] = {1}.[CityID]"), o => ((Application_SystemParameter)o)?.PostalCity, (e, fv, ppe) => { var child = (Application_City)ppe(QueryHelpers.Fill <Application_City>(null, fv)); if (e != null) { ((Application_SystemParameter)e).PostalCity = child; } return child; } , typeof(Application_City), preloadEntities)); }
public Purchasing_SupplierQuery <Purchasing_PurchaseOrderQuery <K, T>, T> JoinPurchasing_Supplier(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Purchasing_SupplierQuery <Purchasing_PurchaseOrderQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Purchasing].[Suppliers] AS {1} {0} ON", "{2}.[SupplierID] = {1}.[SupplierID]"), o => ((Purchasing_PurchaseOrder)o)?.Purchasing_Supplier, (e, fv, ppe) => { var child = (Purchasing_Supplier)ppe(QueryHelpers.Fill <Purchasing_Supplier>(null, fv)); if (e != null) { ((Purchasing_PurchaseOrder)e).Purchasing_Supplier = child; } return child; } , typeof(Purchasing_Supplier), preloadEntities)); }
public Warehouse_StockItemQuery <Sales_InvoiceLineQuery <K, T>, T> JoinWarehouse_StockItem(JoinType joinType = JoinType.Inner, bool preloadEntities = false) { var joinedQuery = new Warehouse_StockItemQuery <Sales_InvoiceLineQuery <K, T>, T>(Db); return(Join(joinedQuery, string.Concat(joinType.GetJoinString(), " [Warehouse].[StockItems] AS {1} {0} ON", "{2}.[StockItemID] = {1}.[StockItemID]"), o => ((Sales_InvoiceLine)o)?.Warehouse_StockItem, (e, fv, ppe) => { var child = (Warehouse_StockItem)ppe(QueryHelpers.Fill <Warehouse_StockItem>(null, fv)); if (e != null) { ((Sales_InvoiceLine)e).Warehouse_StockItem = child; } return child; } , typeof(Warehouse_StockItem), preloadEntities)); }
public Purchasing_PurchaseOrderLineQuery <Purchasing_PurchaseOrderQuery <K, T>, T> JoinPurchasing_PurchaseOrderLines(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Purchasing_PurchaseOrderLineQuery <Purchasing_PurchaseOrderQuery <K, T>, T>(Db); return(JoinSet(() => new Purchasing_PurchaseOrderLineTableQuery <Purchasing_PurchaseOrderLine>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Purchasing].[PurchaseOrderLines] AS {1} {0} ON", "{2}.[PurchaseOrderID] = {1}.[PurchaseOrderID]"), (p, ids) => ((Purchasing_PurchaseOrderLineWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Purchasing_PurchaseOrder)o).Purchasing_PurchaseOrderLines.Attach(v.Cast <Purchasing_PurchaseOrderLine>()), p => (long)((Purchasing_PurchaseOrderLine)p).PurchaseOrderID, attach)); }
public Warehouse_StockItemQuery <Warehouse_PackageTypeQuery <K, T>, T> JoinPackageTypes(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Warehouse_StockItemQuery <Warehouse_PackageTypeQuery <K, T>, T>(Db); return(JoinSet(() => new Warehouse_StockItemTableQuery <Warehouse_StockItem>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Warehouse].[StockItems] AS {1} {0} ON", "{2}.[PackageTypeID] = {1}.[UnitPackageID]"), (p, ids) => ((Warehouse_StockItemWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Warehouse_PackageType)o).PackageTypes.Attach(v.Cast <Warehouse_StockItem>()), p => (long)((Warehouse_StockItem)p).UnitPackageID, attach)); }
public Sales_CustomerQuery <Application_CityQuery <K, T>, T> JoinSales_Customers_PostalCityID_Application_Cities(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_CustomerQuery <Application_CityQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_CustomerTableQuery <Sales_Customer>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Customers] AS {1} {0} ON", "{2}.[CityID] = {1}.[PostalCityID]"), (p, ids) => ((Sales_CustomerWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Application_City)o).Sales_Customers_PostalCityID_Application_Cities.Attach(v.Cast <Sales_Customer>()), p => (long)((Sales_Customer)p).PostalCityID, attach)); }
public Sales_CustomerTransactionQuery <Application_PaymentMethodQuery <K, T>, T> JoinSales_CustomerTransactions(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_CustomerTransactionQuery <Application_PaymentMethodQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_CustomerTransactionTableQuery <Sales_CustomerTransaction>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[CustomerTransactions] AS {1} {0} ON", "{2}.[PaymentMethodID] = {1}.[PaymentMethodID]"), (p, ids) => ((Sales_CustomerTransactionWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Application_PaymentMethod)o).Sales_CustomerTransactions.Attach(v.Cast <Sales_CustomerTransaction>()), p => (long)((Sales_CustomerTransaction)p).PaymentMethodID, attach)); }
public Warehouse_StockItemTransactionQuery <Purchasing_PurchaseOrderQuery <K, T>, T> JoinWarehouse_StockItemTransactions(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Warehouse_StockItemTransactionQuery <Purchasing_PurchaseOrderQuery <K, T>, T>(Db); return(JoinSet(() => new Warehouse_StockItemTransactionTableQuery <Warehouse_StockItemTransaction>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Warehouse].[StockItemTransactions] AS {1} {0} ON", "{2}.[PurchaseOrderID] = {1}.[PurchaseOrderID]"), (p, ids) => ((Warehouse_StockItemTransactionWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Purchasing_PurchaseOrder)o).Warehouse_StockItemTransactions.Attach(v.Cast <Warehouse_StockItemTransaction>()), p => (long)((Warehouse_StockItemTransaction)p).PurchaseOrderID, attach)); }
public Sales_SpecialDealQuery <Warehouse_StockGroupQuery <K, T>, T> JoinSales_SpecialDeals(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_SpecialDealQuery <Warehouse_StockGroupQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_SpecialDealTableQuery <Sales_SpecialDeal>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[SpecialDeals] AS {1} {0} ON", "{2}.[StockGroupID] = {1}.[StockGroupID]"), (p, ids) => ((Sales_SpecialDealWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Warehouse_StockGroup)o).Sales_SpecialDeals.Attach(v.Cast <Sales_SpecialDeal>()), p => (long)((Sales_SpecialDeal)p).StockGroupID, attach)); }
public Warehouse_StockItemStockGroupQuery <Warehouse_StockGroupQuery <K, T>, T> JoinWarehouse_StockItemStockGroups(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Warehouse_StockItemStockGroupQuery <Warehouse_StockGroupQuery <K, T>, T>(Db); return(JoinSet(() => new Warehouse_StockItemStockGroupTableQuery <Warehouse_StockItemStockGroup>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Warehouse].[StockItemStockGroups] AS {1} {0} ON", "{2}.[StockGroupID] = {1}.[StockGroupID]"), (p, ids) => ((Warehouse_StockItemStockGroupWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Warehouse_StockGroup)o).Warehouse_StockItemStockGroups.Attach(v.Cast <Warehouse_StockItemStockGroup>()), p => (long)((Warehouse_StockItemStockGroup)p).StockGroupID, attach)); }
public Sales_InvoiceQuery <Application_DeliveryMethodQuery <K, T>, T> JoinSales_Invoices(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_InvoiceQuery <Application_DeliveryMethodQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_InvoiceTableQuery <Sales_Invoice>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Invoices] AS {1} {0} ON", "{2}.[DeliveryMethodID] = {1}.[DeliveryMethodID]"), (p, ids) => ((Sales_InvoiceWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Application_DeliveryMethod)o).Sales_Invoices.Attach(v.Cast <Sales_Invoice>()), p => (long)((Sales_Invoice)p).DeliveryMethodID, attach)); }
public Purchasing_SupplierQuery <Application_CityQuery <K, T>, T> JoinPurchasing_Suppliers(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Purchasing_SupplierQuery <Application_CityQuery <K, T>, T>(Db); return(JoinSet(() => new Purchasing_SupplierTableQuery <Purchasing_Supplier>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Purchasing].[Suppliers] AS {1} {0} ON", "{2}.[CityID] = {1}.[DeliveryCityID]"), (p, ids) => ((Purchasing_SupplierWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Application_City)o).Purchasing_Suppliers.Attach(v.Cast <Purchasing_Supplier>()), p => (long)((Purchasing_Supplier)p).DeliveryCityID, attach)); }
public Sales_OrderQuery <Sales_OrderQuery <K, T>, T> JoinOrders(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_OrderQuery <Sales_OrderQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_OrderTableQuery <Sales_Order>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[Orders] AS {1} {0} ON", "{2}.[OrderID] = {1}.[BackorderOrderID]"), (p, ids) => ((Sales_OrderWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Sales_Order)o).Orders.Attach(v.Cast <Sales_Order>()), p => (long)((Sales_Order)p).BackorderOrderID, attach)); }
public Application_CityQuery <Application_StateProvinceQuery <K, T>, T> JoinApplication_Cities(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Application_CityQuery <Application_StateProvinceQuery <K, T>, T>(Db); return(JoinSet(() => new Application_CityTableQuery <Application_City>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Application].[Cities] AS {1} {0} ON", "{2}.[StateProvinceID] = {1}.[StateProvinceID]"), (p, ids) => ((Application_CityWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Application_StateProvince)o).Application_Cities.Attach(v.Cast <Application_City>()), p => (long)((Application_City)p).StateProvinceID, attach)); }
public Sales_OrderLineQuery <Warehouse_PackageTypeQuery <K, T>, T> JoinSales_OrderLines(JoinType joinType = JoinType.Inner, bool attach = false) { var joinedQuery = new Sales_OrderLineQuery <Warehouse_PackageTypeQuery <K, T>, T>(Db); return(JoinSet(() => new Sales_OrderLineTableQuery <Sales_OrderLine>(Db), joinedQuery, string.Concat(joinType.GetJoinString(), " [Sales].[OrderLines] AS {1} {0} ON", "{2}.[PackageTypeID] = {1}.[PackageTypeID]"), (p, ids) => ((Sales_OrderLineWrapper)p).Id.In(ids.Select(id => (System.Int32)id)), (o, v) => ((Warehouse_PackageType)o).Sales_OrderLines.Attach(v.Cast <Sales_OrderLine>()), p => (long)((Sales_OrderLine)p).PackageTypeID, attach)); }