Contributors :
Anweshi Deverasetty, Ashutosh Mahamia

This article is the outcome of a recent project, where I was involved in the development of InfoPath based forms with little or zero code. I would like to thank my Development lead Ashutosh Mahamia who helped me with the design of this application.

Introduction

There is growing demand and expectation as well in the field to be able to leverage the new features in SharePoint 2010 to create database-driven simple SharePoint solutions which do not involve a lot of customization, business rules, and validations. This article will help you to understand how BCS and InfoPath, together can supplement this requirement and facilitate database Create, Read, Update, and Delete (CRUD)-operations based on simple applications with a good User Interface.

The Challenge

One of the key challenges in this approach is performance. If the number of records maintained by the application outgrows what the entities can handle, then it provides a poor user experience. The pages render slowly, the data searches take a significant amount of time, and other related issues. So to understand this challenge, we start with exploring BCS capabilities, then explore SharePoint with Microsoft InfoPath, and lastly look at the programmable objects in the database.

The Solution

First, you want to generate BCS Entities which will use stored procedures. As an alert designer or developer, you can easily visualize the high-level benefits of using stored procedures to support BCS (which in turn is the Data Access Layer for the application in question). With this, you have the flexibility of using parameters, governing the resultant data expected, applying a set of business rules within the stored procedures, and then tuning queries to give an enormous performance boost.

Second, you design and develop rich InfoPath-based UI forms, completely out-of-the-box. We harvest a rich UI, New/Edit/View/List forms, with absolutely zero lines of code. Besides the regular CRUD operation support, you also learn how to create associations, filters, and generate these InfoPath forms in a document.

Figure 1. BCS application with InfoPath forms

Figure 1

BCS Entities: The Business cum Data Access Layer

The following is a step by step discussion on how to create the solution as an end-to-end solution.

The following figure is a snapshot of the database diagram that you use in the solution. It consists of Department, Employee and Job tables.

Figure 2. Database diagram

Figure2

Create CRUD Operations on Entities by Using Stored Procedures

First, create the following stored procedures on the Department table for all of the CRUD operations.

Stored Procedure Name Parameters Return Parameters
InsertDepartment

@Deptname

@Location

@User

Deptno

UpdateDepartment

@Deptno

@Deptname

@Location

@User

 
DeleteDepartment @Deptno  
GetDepartment @Deptno

Deptno

Deptname

Location

User

GetAlDepartments  

Deptno

Deptname

Location

User

InsertEmployee

@Empname

@Jobno

@Deptno

@User

Empno

UpdateEmployee

@Empno

@Empname

@Jobno

@Deptno

@User

 
DeleteEmployee @Empno  
GetEmployee @Empno

Empno

Empname

Jobno

Deptno

User

GetAllEmployees  

Empno

Empname

Jobno

Deptno

User

Create an Entity for the Department Table

Create an Entity for Department on which to create all of the CRUD operations. Also, specify the Primary Key/Identity column as given in the following snippet.

Listing 1

<Entity Namespace="DepartmentDB" Version="1.0.0.0" EstimatedInstanceCount="10000" Name="Department" DefaultDisplayName=" Department ">

<Identifiers>

<Identifier TypeName="System.Int32" Name="Deptno" />

</Identifiers>

. . . . .

</Entity>

Generate CRUD Operations on Department by Using Stored Procedures

In the past, you might have often used the SharePoint Designer to easily generate CRUD operations on a table. However, using stored procedures, is often not easy. SharePoint Designer may not be helpful in this case. You will want to create these operations manually. The following discussion demonstrates how to generate CRUD operations by using stored procedures. Create element methods in the Entity element and then add in all of the operations.

Start by creating the following operations on the Department entity.

  • Create
  • Update
  • Read Item
  • Read List

If you are using SharePoint Designer to generate operations on a table then the BackEndObjectType property is set to Table automatically. However, the plan here is to generate CRUD operations by using stored procedures. The following table shows you what needs to be set for a table and stored procedures.

Property Name For Stored Procedure For Table
BackEndObject Name of the Stored Procedure Name of the Table
BackEndObjectType SqlServerRoutine SqlServerTable
RdbCommandText Name of the Stored Procedure Insert the SQL Statement
RdbCommandType StoredProcedure Text
Schema Name of the Schema Name of the Schema

For an example, see the following XML snippet for a stored procedure. For every operation, the following properties need to be set if you are calling a stored procedure.

Listing 2

<Properties>

<Property Name="BackEndObject" Type="System.String">[StoredProcedureName]</Property>

<Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

<Property Name="RdbCommandText" Type="System.String">NameoftheStoredProcedure</Property>

<Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0,

Culture=neutral,

PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

<Property Name="Schema" Type="System.String">[SchemaName]</Property>

</Properties>

Before generating all of the operations, you need to follow these rules:

1. All CRUD operations should return and pass the same set of parameters; otherwise the New, Edit, and View forms will not be generated. This means that the set of parameters that you return from ReadItem and ReadList operations should be the same. Additionally, the parameters that you pass to the Create and Update operations should also be the same. In the case where you have a parameter in the ReadItem operation and you do not return it in the ReadList operation and you do not pass that parameter in the Create or Delete operations then the forms are not generated.

2. Parameters are case sensitive. Make sure that the parameter names are the same and are case-sensitive. Forms will not be generated if the names are different or differ in case. You may receive the following error if the parameters are different:

Could not save changes. No Finders available in the View Group associated with the SpecificFinder (Read Item) operation ‘ReadItem’ on Entity (External Content Type) with Namespace = ‘XXXXX’, Name =’XXXX’. The list cannot be created.

3. Stored procedures should be created before creating the external lists. Though you created CRUD operations on entities, if you do not have corresponding stored procedures, then the forms will not be generated.

Create an Item Operation

Create the Create method with all the input parameters required to be passed to the InsertDepartment stored procedure.

Listing 3

  <Method Name="Create" DefaultDisplayName="Department Create">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">InsertDepartment</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">InsertDepartment</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Deptname"  >

                  <TypeDescriptor TypeName="System.String" CreatorField="true" Name="DeptName"  >

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Location" >

                  <TypeDescriptor TypeName="System.String" CreatorField="true" Name="Location" >

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@User">

                  <TypeDescriptor TypeName="System.String" CreatorField="true" Name="User">

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="Return" Name="Create">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Create">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="CreateElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Deptno" Name="Deptno" />

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Creator" ReturnParameterName="Create" ReturnTypeDescriptorPath="Create[0]" Default="true" Name="Create" DefaultDisplayName="Department Create">

                </MethodInstance>

              </MethodInstances>

            </Method>

 

Update an Item Operation

Create the Update method by passing in the Department Id with all the input parameters that need to be modified into the UpdateDepartment stored procedure

Listing 4

   <Method Name="Update" DefaultDisplayName="Department Update">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">UdpateDepartment</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">UdpateDepartment</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Deptno">

                  <TypeDescriptor TypeName="System.Int32" UpdaterField="true" IdentifierName="Deptno" Name="Deptno" />

                </Parameter>

                <Parameter Direction="In" Name="@Deptname">

                  <TypeDescriptor TypeName="System.String" UpdaterField="true" Name="Deptname">

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Location">

                  <TypeDescriptor TypeName="System.String" UpdaterField="true" Name="Location">

                  </TypeDescriptor>

                </Parameter>                

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Updater" Name="Update" DefaultDisplayName="Employee Update">

                </MethodInstance>

              </MethodInstances>

            </Method>


Delete an Item Operation

Create the Delete method by passing the Department Id that you want to delete into the DeleteDepartment stored procedure.

Listing 5

<Method Name="Delete" DefaultDisplayName="Department Delete">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">DeleteDepartment</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">DeleteDepartment</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Deptno">

                  <TypeDescriptor TypeName="System.Int32" IdentifierName="Deptno" Name="Deptno" />

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Deleter" Name="Delete" DefaultDisplayName="Department Delete">

                </MethodInstance>

              </MethodInstances>

            </Method>

 

 Read an Item Operation

Create a Read Item method that returns the Department values for the specified Department Id by using the GetDepartment stored procedure.

Listing 6

<Method Name="Read Item" DefaultDisplayName="Department Read Item">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">GetDepartment</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">GetDepartment</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Deptno">

                  <TypeDescriptor TypeName="System.Int32" IdentifierName="Deptno" Name="Deptno" />

                </Parameter>

                <Parameter Direction="Return" Name="Read Item">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Read Item">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Read ItemElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Deptno" Name="Deptno" />

                          <TypeDescriptor TypeName="System.String" Name="Deptname">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="Location">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="User">

                          </TypeDescriptor>

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="SpecificFinder" ReturnParameterName="Read Item" ReturnTypeDescriptorPath="Read Item[0]" Default="true" Name="Read Item" DefaultDisplayName="Department Read Item">

                  <Properties>

                    <Property Name="LastDesignedOfficeItemType" Type="System.String">None</Property>

                  </Properties>

                </MethodInstance>

              </MethodInstances>

            </Method>

              </MethodInstances>

            </Method>

 

 Read a List Operation

Create the Read List method that returns all of the Departments by calling the GetAllDepartments stored procedure.

Listing 7

  <Method Name="Read List" DefaultDisplayName="Department Read List">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">GetAllDepartments</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">GetAllDepartments</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="Return" Name="Read List">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Read List">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Read ListElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Deptno" Name="Deptno" />

                          <TypeDescriptor TypeName="System.String" Name="Deptname">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="Location">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="User">

                          </TypeDescriptor>

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Finder" ReturnParameterName="Read List" Default="true" Name="Read List" DefaultDisplayName="Department Read List">

                  <Properties>

                    <Property Name="RootFinder" Type="System.String"></Property>

                    <Property Name="UseClientCachingForSearch" Type="System.String"></Property>

                  </Properties>

                </MethodInstance>

              </MethodInstances>

            </Method>

 

 Create an Entity for the Employee Table

Now, create an entity for the Employee table with all the CRUD operations.

Listing 8 is the XML snippet for the Employee entity with all the CRUD operations.

Listing 8

  <Entity Namespace="EmployeeDB" Version="1.0.0.0" EstimatedInstanceCount="10000" Name="Employee" DefaultDisplayName="Employee">

          <Identifiers>

            <Identifier TypeName="System.Int32" Name="Empno" />

          </Identifiers>

          <Methods>

            <Method Name="Create" DefaultDisplayName="Employee Create">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">InsertEmployee</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">InsertEmployee</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Empname"  >

                  <TypeDescriptor TypeName="System.String" CreatorField="true" Name="Empname"  >

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Jobno" >

                  <TypeDescriptor TypeName="System.Int32" CreatorField="true" Name="Jobno"  >

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Deptno" >

                  <TypeDescriptor TypeName="System.Int32" CreatorField="true" Name="Deptno"   >

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@User">

                  <TypeDescriptor TypeName="System.String" CreatorField="true" Name="User">

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="Return" Name="Create">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Create">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="CreateElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Empno" Name="Empno" />

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Creator" ReturnParameterName="Create" ReturnTypeDescriptorPath="Create[0]" Default="true" Name="Create" DefaultDisplayName="Employee Create">

                </MethodInstance>

              </MethodInstances>

            </Method>

            <Method Name="Update" DefaultDisplayName="Employee Update">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">UdpateEmployee</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">UdpateEmployee</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Empno">

                  <TypeDescriptor TypeName="System.Int32" UpdaterField="true" IdentifierName="Empno" Name="Empno" />

                </Parameter>

                <Parameter Direction="In" Name="@Empname">

                  <TypeDescriptor TypeName="System.String" UpdaterField="true" Name="Empname">                   

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Jobno">

                  <TypeDescriptor TypeName="System.Int32" UpdaterField="true" Name="Jobno">                  

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@Deptno">

                  <TypeDescriptor TypeName="System.Int32" UpdaterField="true" Name="Deptno">                   

                  </TypeDescriptor>

                </Parameter>

                <Parameter Direction="In" Name="@User">

                  <TypeDescriptor TypeName="System.String" UpdaterField="true" Name="User">                  

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Updater" Name="Update" DefaultDisplayName="Employee Update">

                </MethodInstance>

              </MethodInstances>

            </Method>

            <Method Name="Delete" DefaultDisplayName="Employee Delete">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">DeleteEmployee</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">DeleteEmployee</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Empno">

                  <TypeDescriptor TypeName="System.Int32" IdentifierName="Empno" Name="Empno" />

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Deleter" Name="Delete" DefaultDisplayName="Employee Delete">

                </MethodInstance>

              </MethodInstances>

            </Method>

            <Method Name="Read List" DefaultDisplayName="Employee Read List">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">GetAllEmployees</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">GetAllEmployees</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>             

              <Parameters>               

                <Parameter Direction="Return" Name="Read List">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Read List">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Read ListElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Empno" Name="Empno" />

                          <TypeDescriptor TypeName="System.String" Name="Empname">                            

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.Int32" Name="Jobno">                            

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.Int32" Name="Deptno">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="User">

                          </TypeDescriptor>

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="Finder" ReturnParameterName="Read List" Default="true" Name="Read List" DefaultDisplayName="Employee Read List">

                  <Properties>

                    <Property Name="RootFinder" Type="System.String"></Property>

                    <Property Name="UseClientCachingForSearch" Type="System.String"></Property>

                  </Properties>

                </MethodInstance>

              </MethodInstances>

            </Method>

            <Method Name="Read Item" DefaultDisplayName="Employee Read Item">

              <Properties>

                <Property Name="BackEndObject" Type="System.String">[dbo].[GetEmployee]</Property>

                <Property Name="BackEndObjectType" Type="System.String">SqlServerRoutine</Property>

                <Property Name="RdbCommandText" Type="System.String">[dbo].[GetEmployee]</Property>

                <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">StoredProcedure</Property>

                <Property Name="Schema" Type="System.String">dbo</Property>

              </Properties>

              <Parameters>

                <Parameter Direction="In" Name="@Empno">

                  <TypeDescriptor TypeName="System.Int32" IdentifierName="Empno" Name="Empno" />

                </Parameter>

                <Parameter Direction="Return" Name="Read Item">

                  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Read Item">

                    <TypeDescriptors>

                      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Read ItemElement">

                        <TypeDescriptors>

                          <TypeDescriptor TypeName="System.Int32" ReadOnly="true" IdentifierName="Empno" Name="Empno" />

                          <TypeDescriptor TypeName="System.String" Name="Empname">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.Int32" Name="Jobno">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.Int32" Name="Deptno">

                          </TypeDescriptor>

                          <TypeDescriptor TypeName="System.String" Name="User">                           

                          </TypeDescriptor>

                        </TypeDescriptors>

                      </TypeDescriptor>

                    </TypeDescriptors>

                  </TypeDescriptor>

                </Parameter>

              </Parameters>

              <MethodInstances>

                <MethodInstance Type="SpecificFinder" ReturnParameterName="Read Item" ReturnTypeDescriptorPath="Read Item[0]" Default="true" Name="Read Item" DefaultDisplayName="Employee Read Item">

                  <Properties>

                    <Property Name="LastDesignedOfficeItemType" Type="System.String">None</Property>

                  </Properties>

                </MethodInstance>

              </MethodInstances>

            </Method>

          </Methods>

</Entity>

 

 

 In the next post, I discuss creating associations and importing the BCS model.