This is our final release for ES2009, the version number is 2009.2.1214.0. The Developer version and Source Version are available now. The trial version is now available as well. Watch for an announcement on our twitter account if you are waiting on the new Trial version.
oq.Select(oq.CustID, oq.OrderDate, "<sub.OrderTotal>");oq.From ( oiq.Select(oiq.OrderID, (oiq.UnitPrice * oiq.Quantity).Sum().As("OrderTotal")) .GroupBy(oiq.OrderID) ).As("sub");oq.InnerJoin(oq).On(oq.OrderID == oiq.OrderID);
OrderCollection collection = new OrderCollection();oq.es.WithNoLock = true; // <== NEWcollection.Load(oq);
Notice that even though many query objects are being used you only need to set WithNoLock to true for the parent or main query object. The SQL generated is as follows:
SELECT o.[CustID],o.[OrderDate],sub.OrderTotal FROM ( SELECT oi.[OrderID],SUM((oi.[UnitPrice]*oi.[Quantity])) AS 'OrderTotal' FROM [OrderItem] oi WITH (NOLOCK) GROUP BY oi.[OrderID]) AS sub INNER JOIN [Order] o WITH (NOLOCK) ON o.[OrderID] = sub.[OrderID]
From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.
EntitySpaces LLCPersistence Layer and Business Objects for Microsoft .NEThttp://www.entityspaces.net
Page rendered at Tuesday, March 16, 2010 12:06:30 PM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.