This is a migrated thread and some comments may be shown as answers.

PropertyChanged

5 Answers 88 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Simon
Top achievements
Rank 1
Simon asked on 24 Nov 2011, 10:02 PM
Hello,

It would be a great feature for OpenAccess to implement automatically the PropertyChanging and PropertyChanged events in the generated entities without any changes or maintenance to the T4 template.

Those two events are common implementations nowadays... (You even wrote an How-To article about those events)

For more flexibility, a boolean property in the Domain Class could let us choose if we want the PropertyChanging and PropertyChanged to be implemented.

Best Regards,

 

5 Answers, 1 is accepted

Sort by
0
Ivailo
Telerik team
answered on 29 Nov 2011, 11:30 AM
Hi Simon,

Thank you for the idea. It has been logged and we will discuss adding such functionality in one of our future releases.


Best wishes,
Ivailo
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Simon
Top achievements
Rank 1
answered on 01 Feb 2012, 04:53 PM
Hi Ivailo,

One more argument in favor of a built-in generation of PropertyChanging and PropertyChanged events.

I just updated OpenAccess to it's latest version and I did find out that:

1) The new version of Open Access overwrited the change I've made in the .ttinclude files

2) When I went back to the How-To article to fix what has been overwrited, the code provided in the article doesn't match the new .ttinclude file so if someone doesn't pay attention or don't understant what is in the .ttinclude, that may lead to some bug during the code generation.

Best regards,

Simon
0
Ivailo
Telerik team
answered on 06 Feb 2012, 10:54 AM
Hello Simon,

Thanks again for the feedback.

Here are the answers of the problems you have mentioned:

1) The best practice for working with an updated set of templates we recommend in general is to make a copy of them and add it to your solution. This way you can both have them under source control (if any) and used by all team members (if any). Also they will be defended against any unwanted replacement and the old ones will always be available in case you wish to revert your changes.
Not including the best practice in the article is a mistake from our side and it will be addressed. Please find your Telerik points updated.

2) We have double-checked the article but except the problem from point (1) we failed to identify any other discrepancies. Could you please share with us the location of the error you have encountered or any description of what went wrong on your side? 

Regards,
Ivailo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Simon
Top achievements
Rank 1
answered on 06 Feb 2012, 12:37 PM
Hello Ivailo,

At #5, the code to locate has changed from
if (!codeClass.DoubleDerived)
{
this.GenerateProperties(codeClass.Properties);
//GenerateAssociations(@class);
//GenerateOperations(codeClass.BaseClass.Functions);  
if(codeClass.NestedClasses.Count > 0)
{
 this.GenerateNestedOIDClasses(codeClass);
}
}
 
this.WriteLine(classCloseToken);


To

if (!codeClass.DoubleDerived)
{
    this.GenerateProperties(codeClass.Properties);
    //GenerateAssociations(@class);
    //GenerateOperations(codeClass.BaseClass.Functions);        
    //if(codeClass.NestedClasses.Count > 0)
    //{
    //  this.GenerateNestedOIDClasses(codeClass);
    //}
}
 
this.WriteLine(classCloseToken);


Regards,

Simon
0
Ivailo
Telerik team
answered on 06 Feb 2012, 04:32 PM
Hello Simon,

Thanks for the information, I have added some more Telerik points to your account. We will fix this error and add the best practice description in the next couple of weeks.

Regards,
Ivailo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Feature Requests
Asked by
Simon
Top achievements
Rank 1
Answers by
Ivailo
Telerik team
Simon
Top achievements
Rank 1
Share this question
or