How to: Implement INotifyPropertyChanging/ed Interface

Thread is closed for posting
1 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 04 Aug 2011 Link to this post

    Requirements

    OpenAccess ORM version

     2011.2 713

    .NET version

     3.5

    Visual Studio version

     2010

    programming language

     C#


    PROJECT DESCRIPTION                                    

    This project demonstrates how to customize the code generation in order to implement the INotifyPropertyChanging and INotifyPropertyChanged interfaces by defining a custom template for the Domain Model. This approach allows the user to "inject" any actions needed in the property setter.

    The project includes both the custom template and a sample Domain Model defined using the template. It also provides an example for defining the event handlers.

    For further information refer to the documentation at:
    http://www.telerik.com/help/openaccess-orm/openaccess-tasks-model-tools-use-code-generation-templates-implement-inotifypropertychanged.html

    Before running the project:

    1) Run the DBScript.sql on an SQL Server 2008 installation

    2) Configure the connection string HowToCustomizePropertySetterConnection in the following App.config file to point to the SQL database created by the provided script

    3) Open the Domain Model, right click on it and select Show Model Settings. On the Advanced Settings tab, browse for Custom Template and select the CustomTemplate.tt file provided with the project.

    4) Test the connectivity of the Domain Model

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.