Thursday, December 3, 2009

LINQ to SQL Entity Base - Version 1.2 Beta

Hi everyone,

I've released a beta of the LINQ 2 SQL Entity Base - included in it is the following changes since the V1.1 final:

  • Bug Fix: If the entity's state is "New", LINQ to SQL Tries to attach an FK references as "New" as well - even though this was unintended. Fixed it so it does not try and insert FK referenced entities when adding a new object. Thanks Mark & Stephan for finding/fixing the issue
  • Bug Fix: If the onModifyKeepOriginal parameter on SetAsChangeTrackingRoot() is set to true and an object is detached from a collection (i.e. x.remove(y)), the object was not being attached properly to the data context when SynchroniseWithDataContext() was called, causing an error to be thrown. Thanks Yaki for finding the issue!
  • Bug Fix: When EntityState == CanceNew, don't change to EntityState == Deleted when SetAsDeleteOnSubmit is called.
  • Feature: Added ShallowCompare Method, which compares the properties of two entities and returns true if all the properties match (compare LINQ to SQL ColumnAttribute properties only).
  • Feature: If the onModifyKeepOriginal parameter on SetAsChangeTrackingRoot() is set to true, and an object is modified (i.e. EntityState == Modified) and then modified again in a way which set's it back to be the same as property values as it's original state, the entity will now have it's EntityState set to back Original (instead of remaining as EntityState == "Modified").

It can be downloaded here:

http://linq2sqleb.codeplex.com

Cheers

Matt.

No comments: