Up DevForce release notes

6.1.3 release-notes

Last modified on August 15, 2012 17:21

DevForce 2010 now officially supports Code First style development. This release of DevForce also introduces a new paging class called the EntityQueryPager, improves support for dynamic queries, and contains a number of other enhancements and bug fixes.

The DevForce 2010 installation now automatically installs PostSharp 2.1 from SharpCrafters to enable our Code First support. Visual Studio must be closed for the automatic install to work successfully. (The installer is included with 6.1.3, so you can also install it manually from DevForce 2010/Tools/PostSharp Installer.) If you have an earlier version of PostSharp installed you’ll receive an information message during installation, and the new version will be installed side-by-side.  See F1774 for more information. 

After upgrading to this release, you must regenerate your code from the EDMX. Do this by re-saving the EDMX or by right clicking the .EDMX.TT file within Visual Studio 2010 and selecting Run Custom Tool.

Code First

We’ve made significant changes and improvements to our Code First support since the 6.1.2 Community Technology Preview.

Breaking changes

  • The EntityWrapper class has been removed. This has several implications.
    The Entity class no longer inherits from the EntityWrapper class but instead implements the IEntity interface, which consists of exactly one method:
    public interface IEntity   {
        EntityAspect EntityAspect { get; }

    The EntityAspect class has not changed in that it implements a superset of the methods that were present on the EntityWrapper class, and is the "gateway" to entity-related services.  
    An EntityAspect can be acquired from any Entity either via its EntityAspect property or the new static EntityAspect.Wrap(object entity) method that will return the EntityAspect for any DevForce entity.  
  • The EntityAspect property of the base Entity class is no longer virtual. If you had previously overridden this property you can instead use the new keyword.
  • The EntityWrapperExtensions class was removed. The extensions allowed you to perform entity-related actions directly on your entity. Where previously you might have done something like the following:

    You'll now use the EntityAspect directly:

    If you prefer, or if using a Code First entity in which the IEntity interface is injected at build time, you can use EntityAspect.Wrap() to access the EntityAspect.  For example:
  • The PocoEntityWrapper has been removed.
    Previously, to access entity-related services for a POCO class you used the PocoEntityWrapper.  For example:
    var foo = new Foo();
    var wrapper = PocoEntityWrapper.Wrap(foo);
    var isAdded = wrapper.EntityState.IsAdded();

    You’ll now use EntityAspect.Wrap():
    var foo = new Foo();
    var wrapper = EntityAspect.Wrap(foo);
    var isAdded = wrapper.EntityState.IsAdded();
  • The IHasEntityAspect interface has been renamed to IHasPocoEntityAspect. If your POCO class previously implemented IHasEntityAspect in order to access the EntityAspect property for entity-related services, it can use IHasPocoEntityAspect instead.
  • EntityGroup now implements an IEnumerable<EntityAspect> instead of an IEnumerable<T> where T is an Entity. The workaround to retrieve the entities is:
    var entities = anEntityGroup.Select(entityAspect => entityAspect.Entity);
  • The AsyncSerialTask and AsyncParallelTask classes have been removed. These classes had been marked obsolete since October 2010. The Coroutine class provides a much richer mechanism for controlling asynchronous processing and should be used in place of the removed classes.  [F1746]
  • The QueryBuilder class, marked obsolete since February 2011, has been removed in favor of the QueryableExtensions class, which provides additional functionality.  [F1747]

Defect repairs

  • Improved error message when EDM metadata is not found or is invalid. [D1807]
  • Exclude assemblies already in catalog when loading a dynamic XAP. [D1822]
  • The EntityManager FindEntityGraph method doesn’t work with inherited sub-types. Fixed. [D1845]
  • CodeFirst – Database generation is now disabled during a build. In the previous release, a database was generated for a new model during project build as the ibmmx was generated.  [D1846]
  • CodeFirst - The presence of a Nuget package.config file in a project caused the ibmmx generation to fail. Fixed. [D1847]
  • CodeFirst – Fixed a problem in which DTC was required if a new database was created at run time. [D1848]
  • Fixed an initialization problem with the TracePublisher when the EntityService uses net.tcp under IIS.  [D1852]
  • A DbKey is no longer created for non-CodeFirst POCO types.  [D1853]
  • Fixed problem where a query resulting from an entity navigation would return empty results when the ReferenceStrategy was set to 'NoLoad' even when entities were already present in the cache. [D1854]
  • Fixed a problem with occasional errors during GZip decompression resulting in error "Destination array is not long enough to copy all the items in the collection."  [D1860]
  • Fixed a problem in which clicking on the "DevForce Template" dropdown in the EDM designer properties caused the .tt file to be overwritten.  [D1863]
  • Corrected an inconsistent error message with immediate execution queries requiring query inversion. [D1865]
  • Fixed formatting and spelling problems where the StringLengthVerifier would compose the wrong default error message when only a minimum string length was specified. [D1866, D1871]
  • Fixed problem where modifying a detached entity after using EntityManager.Clear() would causes a NullRefException. [D1867]
  • Corrected an issue where a sequence of clone, attach and remove operations on an entity could result in a duplicate entity in the EntityManager's cache after a SaveChanges call. [D1868]
  • Corrected issue where an ".Equals()"  expression inside of a LINQ Where() clause would throw an exception whereas the relational “==” operator would work. [D1869]
  • Detached entities are no longer validated when modified. [D1872]
  • Fixed issue where .NET Validation Attributes were not being picked up when used in Desktop CLR as opposed to the Silverlight CLR. [D1873]
  • Now have a consistent means of registering a probe assembly at design time between WPF and Silverlight. [D1875]
  • A database error which occurs during the save of a many-to-many association is now correctly returned to the caller.  [D1876]
  • Fixed issue where EntityManager.RejectChanges() was not restoring deleted entities in related entity collections. [D1878]
  • The CompositionHost IgnorePatterns now start the pattern match at the beginning of a string in many cases. This allows assemblies containing, but not starting with, the word "IdeaBlade" or "Telerik" for example, to be included in probing. [D1879]
  • The CompositionHost will now correctly probe GAC-deployed assemblies specified in the <probeAssemblyNames> configuration element. [D1882]
  • The CompositionHost IgnorePatterns now exclude Xceed and PostSharp assemblies from probing. [D1883]
  • A NullReferenceException no longer occurs during temp Id validation if an entity does not exist for a temporary id.  [D1886]
  • PredicateDescription.ToString() no longer throws an exception when called on an 'unresolved' PredicateDescription – it now returns '[Not yet resolved]'.  [D1887]
  • Corrected several situations where the TempIds stored in an EntityManager were superfluous - with ids in the map without a corresponding entity in cache – these errors could have resulted in tempId validation errors during Saves. [D1888]
  • EntityManager.GeneratedId on a detached entity will no longer add a tempId to the EntityManager until added to the EM.  [D1889]
  • A "server-side" key (either EdmKey or DbKey) is no longer created when using a Fake composition context.  [D1890]
  • IdeaBlade.Aop.SL assembly was missing PostSharp license file causing any CodeFirst entity that is defined in a Silverlight project to fail compilation. Fixed in [D1896]

New and improved product features

  • EntityManager.ImportEntities now returns a dictionary that maps original EntityAspects to their newly imported counterparts.  [F1682]
  • There is a new EntityQueryPager class in IdeaBlade.EntityModel that allows any EntityQuery<T> to be paged either synchronously or asynchronously. The new paging logic now also accounts for the state of the entities in the client-side cache.  [F1754]
  • The DevForce icon is now displayed in the Visual Studio solution explorer for .cf and .ibmmx files.  [F1755]
  • CodeFirst - The ibmmx file now contains a license key, allowing an application containing only a CodeFirst model to be deployed.  [F1758]
  • The "DevForce Code First Project Item" is automatically added to a project when the "CodeFirst" template is used to generate the model.  [F1761]
  • A project can contain multiple CodeFirst models, or a mix of CodeFirst and EDMX-based models.  [F1764]
  • PostSharp 2.1 from SharpCrafters is now installed as part of the DevForce installation. PostSharp is installed with a redistributable license to enable use of the new DevForce AOP support within Code First. If you do not anticipate using Code First you can uninstall PostSharp separately. The PostSharp executable is also included in the DevForce Tools folder, and can be reinstalled at any time.  [F1774]
  • CodeFirst - Add InternalsVisibleTo(Sytem.Runtime.Serialization) attribute to the Silverlight project when adding a link to the ibmmx file. This attribute allows Code First entities to be serialized between the Silverlight client and the EntityServer.  [F1776]
  • Faster failure detection and better error message if a connection string is not found.  [F1781]
  • Added dynamic query support for projected aggregates [ F1784].  The following LINQ query:
    var query = manager.GetQuery<OrderDetail>()
               .GroupBy(od => od.Order.CustomerID)
               .Select(od => od.Sum(od1 => od1.Quantity));

    Can now be expressed as a dynamic query:
    var qBase = new EntityQuery<OrderDetail>();
    var ps = new ProjectionSelector("Order.CustomerID");
    var gps = new ProjectionSelector("Sum", new ProjectionSelector("Quantity"));
    var qFinal = qBase.GroupBy(ps).Select(gps);
Created by DevForce on October 10, 2011 11:55

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade