What's new/changed in LLBLGen Pro Runtime Framework v4.1?
Below you'll find a list of changes, additions and important fixes in the 4.1 release
of the LLBLGen Pro Runtime Framework. It's recommended you also browse the
Migrating your code
section for breaking changes and how to migrate your current project with
generated code to v4.1.
What's new in LLBLGen Pro v4.1
Below you'll find what's been introduced in LLBLGen Pro Runtime Framework v4.1
New functionality / changes
General
- Full async API. The runtime framework now offers a full Async API, usable in Linq, QuerySpec and the Low-Level API
for retrieval of data and object persistence. Usable in async/await code on .NET 4.5 and higher. More information...
- Transient Error Recovery The runtime framework now offers the ability to recover from transient errors
occuring during database activity. More information...
- Oracle 12c support The runtime now supports Oracle 12c: Identity/default sequences are now supported on
Oracle 12c as well as the new paging keywords for SELECT on Oracle 12c.
- Managed Oracle ODP.NET provider support The runtime now supports the managed ODP.NET provider for Oracle
(v12+ of ODP.NET).
Changed
- The default for the designer setting TdlEmitTimeDateInOutputFiles has been changed to false.
- LinqMetaData now has an overload of GetQueryableForEntity: GetQueryableForEntity<TEntity>(), which accepts a generic type and returns a DataSource(2) object for the given entity type.
- If a sequence retrieval query(fragment) returns null before/after an insert, due to wrong sequence semantics or the field isn't marked as identity in the database while the mapping code defines it as a sequenced field, an exception of type ORMBadSequenceException is now thrown. The exception contains the query executed.
- CachingController now has a static public field, CachingEnabled (default true), which controls whether the caching controller caches resultsets (true, default), or silently doesn't cache any resultsets (false). Useful when debugging code which otherwise would cache the resultset.
- To QuerySpec the fluent extension method IEntityRelation.SetCustomFilter(..) (2 overloads) has been added to easily set a custom filter on a relation specified in a queryspec query. This extension method, as most QuerySpec extension methods, is also usable with the low-level API.
- Adapter now has a new method on entities: DetachFromGraph. This method will detach the entity it's called on from its referenced entities, including m:n relations. It will only dereference from the entities it knows of at runtime.
- BREAKING CHANGE: Multiple .Take() calls on a query in Linq will no longer result in 'last Take wins' but will use the lowest number of the Take calls.
- BREAKING CHANGE: OData Support Classes are now build against WCF Data Services 5.6.0.
What's new in LLBLGen Pro v4.0
Below you'll find what's been introduced in LLBLGen Pro Runtime Framework v4.0
New functionality / changes
General
- 50% faster entity fetches. An extensive refactoring of the internal storage of values inside an entity instance resulted in up to 50% faster entity fetches. As entity instances don't have Entity Field instances to store their values anymore (though from the outside it will appear they will, so no code will break), memory footprints are smaller too. See http://pastebin.com/AdsKitr3 for a benchmark of how much faster the fetches are compared to v3.5 and other ORMs.
- Extensible Query Result Caching. It's now possible to specify (in Linq or QuerySpec, and with minor effort also with low-level API calls) a query result cache directive to tell the runtime to cache the results for that particular query for a given amount of time. The caching system is build around an easy interface, making it easy to extend it with own cache providers for cache systems like Redis. More information...
- Table Valued Function support. It's now possible, using Linq and QuerySpec, to fetch entities and typed views which are mapped onto a table valued function resultset. Linq, QuerySpec
- DataScopes. The runtime framework now offers DataScopes which greatly help managing data in memory in desktop applications. More information...
- Runtime Libraries are now compiled against .NET 3.5. The minimum .NET version supported by the runtime framework is now .NET 3.5.
- LinqSupportClasses and QuerySpec assemblies are now merged into ORMSupportClasses. The 3 assemblies are now merged into one, SD.LLBLGen.Pro.ORMSupportClasses.dll. This makes referencing assemblies simpler.
- Inlining of Value Type Definitions in the designer. It's now possible to in-line value type definitions in the designer, which makes modeling LLBLGen Pro projects simpler. More information...
- SQL Server 2012 sequences support The runtime framework now supports SQL Server 2012 sequences in insert queries.
- TypedLists can now be fetched using QuerySpec. Before, the low-level API had to be used to fetch typedlists. In v4.0 we made it possible to fetch TypedLists using the more powerful QuerySpec query API.
- True skip/offset support. It's now possible to skip n rows in a fetch without the requirement that the number of rows fetched is a multiply of n. This is in line with how Skip works in Linq. QuerySpec now has a new operator, Offset(n) which offers the same functionality.
- Char <-> String(1) built-in type converter. The runtime framework now has a built-in type conversion for char <-> string(1), to make it possible to have a DB field of type char(1) be used as a .NET char typed field.
- Support for OData v3. The ODataSupportClasses now support OData v3 and are now compiled against WCF Data Services v5.3.
- QueryExecution Tracer. A new tracer has been added, to trace the actual query being executed. This information was already available through other tracers, but as these also emitted other information it could lead to a lot of data just to see which query was actually executed. This tracer solves that.
- All low-level query API elements, including UnitofWork2, are now XML Serializable. All low-level query API classes, like predicates, relation collection, groupby collection but also the Unit of Work classes, are now serializable to XML, and as such passable to e.g. a WCF Service. This is for Adapter only.
Changed
- SourceFieldFinder. The SourceFieldFinder is now a public class so it can be used to traverse entity graphs in user code.
- Better name length clamping in DB2 and Oracle DQEs. Names were already limited to 30 characters or less for DB2 and Oracle, but in some edge case queries with nested derived tables it could be the field inside a derived table was clamped to a shorter name, but a field referencing it wasn't. Name clamping now uses F__hashcodeOfStringToClamp which is not depending on field index anymore.
- The runtime assemblies are now stored all in one folder. In previous versions the runtime library assemblies were stored in different folders, based on the .net version they were for. This is not needed anymore, so all files are stored in one folder.
- DbCommands are now, when possible, created from DbConnection. This makes it easier to add functionality like the miniprofiler to the generated code.
- DataProjectorToDataTable now creates columns from projectors. This change has the advantage that if the resultset to project has 0 rows, the columns in the datatable are still created.
Fixed