Q2 2013

June 12, 2013

What's new in Telerik OpenAccess ORM Q2 2013

  • Bulk Update functionality through LINQ statements - The runtime is now able to perform bulk update operations on the database server side, without loading the data in advance. The implementation uses a temporary table to keep the primary key values during the operation.
    The provided API is an UpdateAll method as an extension for IQueryable:
    context.Cars.Where(c=>c.Year < 1990).UpdateAll(u => u.Set(c => c.Price, c=> c.Price * 0.9));
  • Bulk Delete functionality through LINQ statements - The runtime is now able to perform bulk delete operations on the database server side, without loading the data in advance. The implementation uses a temporary table to keep the primary key values during the operation.
    The provided API is a DeleteAll method as an extension for IQueryable:
    context.Cars.Where(c=>c.Year < 1990).DeleteAll();
  • Code Generation: New Settings added - The following code generation options are made available out of the box under the Code Generation tab in the Model Settings dialog:
    - Generate DataAnnotation Attributes: generates DataAnnotation Attributes (Required, Key, StringLength and DataType) for each property in your domain model based on the data types and constraints in the database;
    - Implement IDataErrorInfo: provides an easy way to hook your validation logic by implementing a partial method in a partial class;
    - Implement INotifyPropertyChanging;
    - Implement INotifyPropertyChanged.
  • Visual Designer: Schema Migration completed with table removal capabilities - The cleanup capabilities of the current Schema Migration functionality are enhanced with the ability to optionally remove tables that are not represented in the model
  • Domain Method Editor: Support for stored procedure return codes in MS SQL Server - A new chechbox "Generate return value overload..." is added in the Domain Method Editor, visible only for specific cases for retrieving the return code from MS SQL Server.
  • Upgrade References: Report form added - A report form for the results is automatically shown after Upgrade References functionality is executed in the Visual Studio.
  • Add OpenAccess Service: Make code generation aware of entity names pluralization to avoid second pluralization - Add OpenAccess Service wizard will no longer append second pluralization of entities that are already in plural form when generating a Web API service.
  • Add OpenAccess Service: Visual Studio dialog freezes if a generated file is left open when the wizard is executed again, blocking menus and most of the functional keyboard keys - Add OpenAccess Service wizard will no longer put Visual Studio in an unresponsive state
  • Batch Operations Dialog: The read-only cells were editable if 'F2' button is pressed - All cells which show default text are now read only.
  • Cache Cluster: Creation of eviction messages can fail for certain types of primary key fields - When types like DateTime, UInt32, UInt16, UInt64 are used as primary key fields, using the second level cache in a cache cluster setup was failing with exceptions. The workaround was to use long, int, short, or string instead. Currently the described types can also be used without causing failures.
  • Code Generation: Domain Methods generated from StoredProcedures with OUT parameters caused problems - Fixed issues for Domain Methods with multiple result sets that have OUT parameters:
    - The generated code caused compile time errors.
    - The values for all out parameters were no read after the execution
    - Runtime error was thrown when calling Oracle stored procedure with an out parameter of type string.
  • Domain Method Editor: Generation of domain methods with string parameters did not consider the length of the corresponding property - The generated methods now takes into account the returned size of each string parameter from the Schema Read functionality
  • Enhancer: Warnings caused by the enhanced code - The fields added by the OpenAccess Enhancer tool during the build process are now tagged with the compiler generated attribute to avoid unnecessary warnings.
  • LINQ: Unable to use a cast for the group key in a projection - Casts specified on the group key were not supported and resulted in the following exception:
    Unable to cast object of type 'System.Linq.Expressions.UnaryExpression' to type 'System.Linq.Expressions.MemberExpression'.
    Example query:
    from p in this.Scope.Extent<Northwind.Product>()
    group p by p.CategoryID into g
    select new
    Key = (object)g.Key,
    Count = g.Count()
    Now such casts are working without an exception.
  • Runtime: Missing BindByName setting for Oracle commands when context.ExecuteQuery(sql,param) is used - Now the BindByName setting of the Oracle driver is used
  • Visual Designer: If the rlinq file is edited outside the editor (e.g. with notepad) and after that the rlinq is reloaded from the Visual Studio, the Visual Studio was crashing - Currently the Visual Designer remains stable while reloading a model edited separately.
  • Visual Designer: Guid columns are not automatically mapped when using Oracle - Guid columns now correctly recieve default mapping regardless of the backend used.


  • Add OpenAccess Service: Support for Self-Reference associations in WCF Data Services v3 - The code generation for Data Services v.3 is enhanced in order to support Self-Reference associations
  • Code Generation: T4 templates refactored - The Domain Model code generation T4 templates are fully refactored and simplified, which makes them much more extensible
  • Dynamic Data wizard: Automatic population of the Global.asax file with the correct information - During the generation of Custom Pages the needed code is automatically added to the Global.asax file so the dynamic data is usable out-of-the-box.
  • Firebird: Client version updated to 3.0.2 - The default Firebird client used by OpenAccess ORM is updated to 3.0.2.
  • LINQ: Optimal support for paged and ordered queries with a simple distinct projection - RadGridView allows dynamic filtering. When the filter dialog is shown, there is a list of maximum 1000 items that present the possible values to select.
    This list content is calculated by queries like
    Extent<RadGridWpfApp.Person>().Select(item => item.Birthday).Distinct().OrderBy(item => item).Take(1000)
    This query would previously lead to a client side execution.
  • Oracle: Support for functions outside packages - The OpenAccess Schema Read functionality for Oracle is now able to detect database functions that are not part of any package.
  • SchemaRead: Performance for Oracle Schema Reads has been improved - The Schema Read performance for Oracle backends has been improved by redefining the index and procedure statements
  • SQLite: Support for SQLite 1.0.86 - OpenAccess ORM now supports SQLite version 1.0.86
  • Visual Designer: Accessibility improvements - The Design Time wizards and dialogs of OpenAccess ORM are now better usable with JAWS and Microsoft Narrator