Please make a checkbox for IEquatable Implementation

Oct 26, 2010 at 9:33 PM

Hi, I have been running into a nice(or not) feature of the Silverlight datagrid, which is to take, by default, the Equals method for comparison.  

When using List.AddNew(), my ID's are = 0, which means .Equals() will return true, which in turn prevents the user from selecting identical records.  This is problematic.  A nice fix would be to be able to remove the IEquatable Implementation for a given object using the EntityModel's custom properties.  Thanks.

Coordinator
Oct 27, 2010 at 7:05 AM

Hi.

No problem, I'll add this request to our IssueTracker. It will be published in version 1.0.2 as soon as possible. 

Regards,

Josip

Coordinator
Oct 27, 2010 at 7:06 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Oct 27, 2010 at 9:09 AM

Hi. 

I've implemented this request and have created new release. This is not recommended public release but if you want to try it you can download it from the Downloads page (on the right side navigate to Version 1.0.2. ALFA). If you install new version be sure to replace T4 file.

Implementation details: 

I've added two properties:

EF designer => Csla Generate Equals, where you can set generation rules for all entities in the model. By default IEquatable is implemented for all objects, and using this property you can change that.

Entity => Csla Generate Equals; here you can set generation rules for one entity. By default rule is inherited from model, but using this property you can override that behavior

 

Regards, 

Josip

 

Oct 27, 2010 at 1:33 PM

Thanks a lot!!

Oct 27, 2010 at 5:36 PM

I think there is a bug : when I choose to not have IEquatable at all(with the edmx's properties), the implemented methods are not present(100% what I want), but there is still the reference to IEquatable in the class definition, which causes the classes not to compile.  Thanks Again!

Coordinator
Oct 27, 2010 at 7:49 PM

Bug fixed. I have replaced the vsix package.