Microsoft Office Tutorials and References
In Depth Information
By default, an entity ( Entity1 ) is added to the model as shown in Figure 4-23 . you will use it and configure it in this
example. entity1 consists of identifier1 as its identifier and two methods, namely ReadList Finder method) and (
ReadItem Specific Finder method). While ( ReadList returns an entire entity collection, ReadItem returns only the
specific collection item that matches the input filter parameter.
visual studio lets you add different stereotypes and methods for an entity of an external content type to perform
the various operations noted next. all these methods are called by the BDC shared service. as soon as you create these
methods, visual studio adds corresponding empty and not implemented methods in the entity service class file.
Note
Blank Method: Create a custom method to perform a specific operation in addition to the following methods.
Creator Method: implement a method to create and return a new entity. this method is named Create .
Deleter Method: implement a method to delete an existing entity instance. this method is named Delete .
Finder Method: implement a method to query and return a list or collection of entities. this method is named ReadList .
Specific Finder Method: implement a method to query and return a specific entity. this method is named ReadItem .
Updater Method: implement a method to edit an existing entity instance. this method is named Update .
in the employees table, BusinessEntityID is the primary key and hence you need to configure the entity1
type Descriptor such that it can be mapped to BusinessEntityID . as you might have noticed, identifier1 in this
example is a type Descriptor of type System.String . you need to set its type to System.Int32 in order to make it
work in conjunction with the BusinessEntityID data type.
6.
select identifier1 under entity1 in the designer window. in the properties window, change the
type name to System.Int32 .
7.
expand the BdcModel1 under the BDC explorer. Go to the ReadItem and ReadList method
input and output parameters and change identifier1 type name to System.Int32 as shown
in Figure 4-24 .
 
Search JabSto ::




Custom Search