In the previous blog post, we described how to use the Business Connection service object model on a SharePoint server to connect to the BCS service metadata store to get an enterprise core business system object, external content type and its methods, and how to execute an external content type.
This article demonstrates how to execute a Finder method with an external content type defined by a filter.
Steps
1, use SharePoint Designer 2010 to create a new external content type, using the Employees table of the AdventureWorks2000 database. Set a filter for the ECT in the first Name column.
Notice that we have checked the checkbox "Ignore filter if the value is the following".
2. Open Visual Studio 2010 and select a new visual Web part project from the SHAREPOINT2010 Project category.
3. In the design mode of the WebPart user control, add some text "Name:". Then drag and drop a text box and a button. Set the ID of the text box to Firstnametextbox and the button's ID to SearchButton. Finally, add a GridView. After the completion of the interface as shown below: