DomainDataSource.SubmitChanges 如何知道在服务器上调用的方法

发布于 2024-08-31 23:33:29 字数 161 浏览 2 评论 0原文

我通过设置 Query 属性将 DomainDataSource 配置为执行特定的服务器端方法。如果我随后对检索到的数据进行更改,并调用 SubmitChanges,则控件会以某种方式知道要调用的正确方法。 (例如UpdateEmployee)更新方法的名称在哪里设置,或者它只是通过某种命名约定推断出来的?

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. (UpdateEmployee for example) Where is the name of the update method set, or it is simply inferred by some sort of naming convention?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泅人 2024-09-07 23:33:29

它是通过命名约定和签名推断出来的。以 Employee 作为参数的 UpdateXXX/ModifyXXX 方法是员工的更新方法。

或者,如果方法的名称与约定不匹配,那么您可以通过方法上的属性 [Update] 进行配置。签名仍然必须匹配。

希望有帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文