Reverse mapping templates for generating classes that implement the INotifyPropertyChanged interface

3 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 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. Adam
    Adam 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. Alexander
    Admin
    Alexander avatar
    727 posts

    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