Data Contract Model Activities

Retired Content

The Web Service Software Factory is now maintained by the community and can be found on the Service Factory site.

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Retired: November 2011

Figure 1 shows the activities that you can perform on the Data Contract Model.

Ff650179.2b4b20ec-7cf7-4d9b-be04-be413d40f5d2(en-us,PandP.10).png

Figure 1
Data Contract Model activities

The following are the main activities after you add the Data Contract Model to the solution. All of these activities are optional except where noted.

Design Activities:

Add a data contract (see Exercise 2) (completing at least one sub-activity is required).

  1. Add a data contract elements.
  2. Add a primitive data type. A primitive data type is a primitive .NET type, such as System.Int32 or System.String.

Add a data contract enumeration (see Exercise 2).

  1. Add values.

Aggregate enumeration element.

Aggregate data contract element (see Exercise 2).

Add a collection (see Exercise 2).

  • Add a primitive data collection. This can be a list, collection, or dictionary of primitive .NET types.
  • Add a data contract collection. This can be a list, collection, or dictionary of data contracts.

Aggregate collection element (see Exercise 2) (completing at least one sub-activity is required).

  • Aggregate collection of primitive data elements.
  • Aggregate collection of data contracts.

Add a fault contract (see Exercise 2).

  1. Add a primitive data element to the fault contract (see Exercise 2).

Implementation Activities:

Select the implementation technology (see Exercise 4 or 6). This allows you to select either WCF or ASMX as the implementation technology. For more information, see “Data Contract Model” in Choosing a Technology.

Add technology specific properties (see Exercise 4 or 6). For more information, see “Data Contract Model” in Choosing a Technology.

Validate the Data Contract Model (this may be done at anytime).

  1. Validate a selected element.
  2. Validate the entire model.

Create implementation projects for WCF or ASMX service implementation (see Exercise 5 or 6).

Associate the Data Contract Model with a Project Mapping Table (see Exercise 5 or 6).

Generate code for the data contract and fault contract implementation (see Exercise 5 or 6) (completing at least one sub-activity is required). For more information about generating code, see Generating the Implementation.

  1. Generate code for a selected element.
  2. Generate code for the entire model.

For more information about the specific elements on the Data Contract Model, see “Data Contract Model” in Designing with the Models.