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".
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
[C#] public Response Execute( Request Request );
[JScript] 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.
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
© 2007 Microsoft Corporation. All rights reserved.