Execute Method

banner art

In addition to the common methods, you can use another method specifically to execute business logic and other special operations. This method, called the Execute method, uses a message-based approach, and supports a message class hierarchy to group similar operations. This method takes a message request class as a parameter and returns a message response class. Request message class names end with the keyword "Request". Response message class names end with the keyword "Response".

Execute Method

Message Requests and Responses

The Execute method has a request parameter and returns a response as shown below:

[Visual Basic .NET]
Public Function Execute(
  ByVal Request As Request
) As Response
public Response Execute(
  Request  Request
public function Execute(
  Request : Request
) : Response;

For each supported message, there are corresponding sub-classes for the Request and Response classes. The following diagram shows a portion of the hierarchy of request and response classes.

Request and Response Class Hierarchy

There are two types of request classes: generic and entity specific.

Note   You must set all fields in the request class. Leaving fields blank or null may have unexpected results.

In This Topic

Generic Request Classes

Entity Specific Request Classes

Dynamic Entity Request Classes

Message Target Classes

© 2007 Microsoft Corporation. All rights reserved.