LINQ to Ucommerce provides rich capabilities to query the data stores of Ucommerce, but with great power comes great responsibility. This exercise introduces the three levels of data APIs.
UCommerce.InfrastructureOjbectFactory.Resolve<T>UCommerce.EntitiesV2IRepository<T>.Select()ISessionProvider.GetSession()UCommerce.EntitiesV2ProductPurchaseOrder.CreatedDate
NHibernate.LinqEagerFetchingExtensionMethods.Fetch()EagerFetchingExtensionMethods.FetchMany()
Query for orders created after a certain date.
Query for products promoted to the homepage
Join product to order line on Sku and VariantSku
N+1
Eager Loading to Avoid N+1
Large Cartesian Products Avoided
Total Control of SQL with HQL
{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}