Released on 24th of May 2006 (build: #29)
Genome 2.6.1 for .NET2 was released on 8th of June 2006 (build: #9)
As we are in the process of building the infrastructure for advanced features announced for the upcoming Genome 3.0 release, we can already make some improvements available now.
Improved data population
We have optimised Genome for many data populating scenarios. These optimisations are transparent, so you can benefit from them without modifying the code.
Improved by-Id query generation
We have introduced an internal caching mechanism for generated SQL queries that retrieve objects by their identity values. The cached queries are stored in an LRU cache to provide you fast access to the most commonly used objects while keeping memory consumption under a certain limit. For most applications, the default cache size (twice the number of persistent classes) will be suitable, but you can fine-tune this value (or even disable the cache) by setting the DataDomainConfiguration.ByIdQueryCacheSize property for DataDomain creation.
Predictive caching for set properties
We have refined Genome's predictive caching feature to allow you to bypass lazy loading for set properties in order to optimise nested query execution. In previous releases, this optimisation feature could only be used for singular references (near object references). See PredictiveCacheManager.PrecacheSet in Genome's documentation for details about this feature.
To support predictive caching for set properties, we have introduced the first version of query caching in Genome. With the QueryCacheManager.CacheSet method, you can load up and store the content of a set instance in the Context and use the query for data operations without executing additional queries to the database. You can control the cache's behaviour using the same cache configuration rules as you do for object-level caching. Specifying typeof(Set) in the cache rules alters the configuration specifically for the query cache. Read more about this feature under QueryCacheManager.CacheSet.
We have introduced a new event that can be used to execute direct SQL commands (like SET LOCK_TIMEOUT) when a new connection/transaction is initiated by Genome. See Context.AfterOpenConnection for details.
Transforming merge-incompatible queries automatically
In previous versions, intersecting or subtracting queries that have different query structures was not possible without reformulating the query. Genome can now perform this transformation automatically in most cases.
Mapping the SQL "IN" operator
You can now generate queries with the SQL “IN” operator. The newly introduced Sql.IsIn() method can handle Genome sets (of scalar element type) and any other arbitrary client-side IEnumerable collections. A sub-query expression in the former case, and a list of values in the latter case will be generated for the SQL IN operator. Read more about this feature under Sql.IsIn (object, Set) and Sql.IsIn (object, IEnumerable).
To decrease the complexity of OQL queries, we have introduced a new operation on the Set class. With the Set.Contains Set.Contains method, you can easily and efficiently check whether an item is in the set both on the client and on the server side. The framework will choose the best implementation depending on your set's element type. If the element type is a scalar or persistent class that only has one primary key, a SQL “IN” operator is generated with a sub-query expression. If the element type has more than one primary key, then the “EXISTS” SQL operator is used instead.
This version introduces extensions for using Genome with Winforms applications, including an adapter for the Set to be used with the Winforms datagridview control.
The NorthwindDatabinding samples demonstrate how to use Genome with the new Winforms extensions.