This is a quick post to explain how to use the new built in EntitySpaces Concurrency Mechanism. Basically, all that is required is that you add an integer type column to your table. In the table below I have added a column named “MyTimestamp” which is of type “int”. All we need to do now is drill down to this column on the EntitySpaces “Metadata” Tab and indicate that we want to use this as our concurrency column.
This is very easy, and if you’re on our Q3 release there are no more name/value pairs, you simply enter user metadata choices directly in the property grid.
Notice here I have set the IsEntitySpacesConcurrency flag to true. Now all I have to do is click the little Save icon and regenerate my “Generated” class.
The path to the Metadata file can be found on the “Settings” tab in the “File Locations” section. See the “User Metadata” path. The resulting xml for the simple entry above is as follows.
<esUserData Version="2009.2.1012.0"> <Drivers> <Driver Name="SQL"> <Databases> <Database Name="MyDatabase"> <Tables> <Table Name="MyTable"> <Columns> <Column Name="MyTimestamp" IsEntitySpacesConcurrency="True" /> </Columns> </Table> </Tables> </Database> </Databases> </Driver> </Drivers></esUserData>
This technique can be used on all non-compact framework databases ..
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 Saturday, March 13, 2010 9:57:19 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.