PropertyChanged

6 posts, 0 answers
  1. Simon
    Simon avatar
    159 posts
    Member since:
    Sep 2010

    Posted 24 Nov 2011 Link to this post

    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,

     
  2. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 29 Nov 2011 Link to this post

    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!

  3. DevCraft banner
  4. Simon
    Simon avatar
    159 posts
    Member since:
    Sep 2010

    Posted 01 Feb 2012 Link to this post

    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
  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 06 Feb 2012 Link to this post

    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 >>
  6. Simon
    Simon avatar
    159 posts
    Member since:
    Sep 2010

    Posted 06 Feb 2012 Link to this post

    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
  7. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 06 Feb 2012 Link to this post

    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 >>
Back to Top
DevCraft banner