开发者

how does the DomainDataSource.SubmitChanges know the methods to call on the server

开发者 https://www.devze.com 2022-12-29 20:40 出处:网络
I configure the DomainDataSource to execute a particular server side method by setting the Query property.If I then make changes to the retrieved data, and call SubmitChanges the control somehow knows

I configure the DomainDataSource to execute a particular server side method by setting the Query property. If I then make changes to the retrieved data, and call SubmitChanges the control somehow knows the correct method to call. (UpdateEmploy开发者_StackOverflow社区ee for example) Where is the name of the update method set, or it is simply inferred by some sort of naming convention?


It is inferred through a naming convention along with signature. An UpdateXXX/ModifyXXX method taking in a Employee as parameter is the update method for employees.

Alternatively, if the name of the method doesn't match the convention, then you can configure it via an attribute [Update] on the method. The signature still has to match.

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号