1) OnContextCreated
By default a declaration of this method will be there as a partial method in the generated code, and as the name suggest this will be invoked during the first time when the ObjectContext class gets created,Hence this is the right place if you want to execute some operation after the ObjectContext creation
2) On
Again this is the partial method which will be executed when the value of the property of an EntityObject is getting materialized,Hence if you wanna to add some logic/validation when the object property is getting assigned this is the right place of choice for you
3) On
This is the other partial method which will be executed after the property value of an EntityObject is assigned,Hence after the assignement if you want to perform any operation here you can write..
Note : Both the On
Happy programming and a very Happy new year
Regards,
-Vinayak
No comments:
Post a Comment