Reverse mapping templates for generating classes that implement the INotifyPropertyChanged interface

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

    Posted 08 May 2009 Link to this post

    Requirements

    OpenAccess version

    all available
    .NET version

    2.0 / 3.5
    Visual Studio version

    2005 / 2008
    programming language

    C# / VB.NET

    PROJECT DESCRIPTION
    These templates are used for reverse mapping database tables to classes that implement the INotifyPropertyChanging and INotifyPropertyChanged interfaces. They are an extended version of the original templates and can be used as default. However, they will replace your existing templates, so make sure you have them backed up in case you do not want to use the new ones anymore.

    To use the templates, you have to extract each archive to a specific folder in the installation path of OpenAccess. By default all class generating templates take place in "C:\Program Files\Telerik\OpenAccess ORM\sdk\IDEIntegrations\templates\PCClassGeneration".
    Having that as an initial path, extract the files as follows:
    • cs-class.zip to "\cs\templates\classgen\class"
    • cs-fieldaccess.zip to "\cs\templates\classgen\fields\field\access"
    • vb-class.zip to "\vb\templates\classgen\class"
    • vb-fieldaccess.zip to "\vb\templates\classgen\fields\field\access"

    Now you have both C# and VB templates installed and you will notice that the generated classes implement the INotifyPropertyChanging and INotifyPropertyChanged interfaces next time you reverse map a database.
  2. EDA1C895-E278-4E71-B0E2-9ABA3EB9E340
    EDA1C895-E278-4E71-B0E2-9ABA3EB9E340 avatar
    39 posts
    Member since:
    Jun 2009

    Posted 06 Sep 2009 Link to this post

    I am getting (836 errors)

    The name ÓnPropertyChanging does not exist in the current context
  3. E9CC4DB5-51E4-43A8-AD27-8DA47C3C8FC3
    E9CC4DB5-51E4-43A8-AD27-8DA47C3C8FC3 avatar
    727 posts
    Member since:
    May 2017

    Posted 07 Sep 2009 Link to this post

    Hi Adam,

    Please verify that the cs-class / vb-class templates are installed properly. It seems the OnPropertyChanging event handler could not be found. In the Class.cs file you should have this code:
    //INotifyPropertyChanging Members 
    public event PropertyChangingEventHandler PropertyChanging; 
     
    protected virtual void OnPropertyChanging(string propertyName) 
        if (this.PropertyChanging != null
            this.PropertyChanging(thisnew PropertyChangingEventArgs(propertyName)); 

    All the best,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top

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