开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜