Compartilhar via


Building Block: External Content Types and External Lists

Applies to: SharePoint Foundation 2010

A core concept of Microsoft Business Connectivity Services (BCS) is the external content type. Used throughout the functionality and services offered by Business Connectivity Services, external content types are reusable metadata descriptions of connectivity information and data definitions plus the behaviors you want to apply to a certain category of external data. External content types enable you to manage and reuse the metadata and behaviors of a business entity such as Customer or Order from a central location, and enable users to interact with that external data and processes in a more meaningful way.

For example, consider a business entity such as Customer. You might want to interact with items of type Customer inside a SharePoint list. Or, you might want to enable the user to pick a customer from a list of customers in a Web Part. You can create an external content type once and then reuse it anywhere you need it.

An external list is a new feature in Microsoft SharePoint Foundation 2010 that enables accessing data from external systems in the same way that SharePoint list data is accessed. External lists use external content types as their data sources. External lists enable you to use the metadata that is already defined about an external content type to create a SharePoint list that has external data that looks and performs like any other SharePoint list.

Figure 1 shows an external list of customers from the Northwind Sample database.

Figure 1. External list of customers

Customers external list

External lists enable writing back to the external system if the external system allows it, and if it is modeled accordingly by the external content type. This implies that users can edit external data directly from within SharePoint 2010. Any changes that were made to the items in the list are synchronized automatically with the external system. By using the Refresh data button in the list, you can synchronize and get updated data from the external system automatically.

Notice that unlike a SharePoint list whose data is stored in the SharePoint content database, the data in an external list is stored only in the external system. External data is brought into the SharePoint list at run time when you navigate to the list.

Note

The schema of an external list relies on the model and cannot be extended by adding new columns in SharePoint Server 2010. Also in this release, external lists do not offer all of the functionality offered by typical SharePoint lists, such as workflow, content types, versioning, check-in, and check-out.

Object Model for External Content Types and External Lists

Business Connectivity Services provides a rich object model in SharePoint Foundation that you can use to create, find, add, update, and delete external content types. If you are writing code that will execute on the server, you will use members of the Microsoft.BusinessData and Microsoft.SharePoint namespace.

See the following topics for examples and more details of the object model.

XML Used for External Content Types

You can define an external content type by using XML in a BDC Model. For information about the schema used for external content type definitions, see BDCMetadata Schema and BDCMetadataResource Schema. For examples and walkthroughs, see the following topics:

More Information about External Content Types and External Lists