locked
how to generate InotifyPropertyChanged auto in EntityFramework 5 ? RRS feed

  • Question

  • hello evrry one 

    iam camming from linq to sql 

    and iam new in entityframework  so the first probelm that i have is  

    whene i create EF  he do not generate the property with   onpropertychanged("PropertyName")...

    of all the propertyes of the classes ,

    like the linq to sql he do  all the work . he create the classes and implement InotifyPropertyChanged .

    iam wpf devloper  and doing the implementation of the Inotify to all the property will take lot

    of time that in preview linq to sql do it for me 

    so there is eny way to automatically generate the implemetation ?

    Tuesday, January 22, 2013 10:51 AM

Answers

  • Hi Bilal,

    Welcome to the MSDN forum.

    You could modify T4 template to made classes implement INotifyPropertyChanged. Alternatively, you could use another code generator to make it inherits from StructuralObject which implements INotifyPropertyChanged. To do so, right click the empty area on the edmx designer surface>>Add Code Generation Item…>>EF 5.x EntityObject Generator (If you did not install it, you can search it online and install it).

    Have a nice day.


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bilal- Sunday, January 27, 2013 5:25 PM
    Friday, January 25, 2013 2:46 AM

All replies

  • Hi Bilal-,

    I will move your thread to more approrate forum to get better support.

    Best regards,


    Sheldon _Xiao
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bilal- Sunday, January 27, 2013 4:03 PM
    • Unmarked as answer by Bilal- Sunday, January 27, 2013 5:25 PM
    Thursday, January 24, 2013 4:34 AM
  • Hi Bilal,

    Welcome to the MSDN forum.

    You could modify T4 template to made classes implement INotifyPropertyChanged. Alternatively, you could use another code generator to make it inherits from StructuralObject which implements INotifyPropertyChanged. To do so, right click the empty area on the edmx designer surface>>Add Code Generation Item…>>EF 5.x EntityObject Generator (If you did not install it, you can search it online and install it).

    Have a nice day.


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bilal- Sunday, January 27, 2013 5:25 PM
    Friday, January 25, 2013 2:46 AM