IT tutorials
 
Technology
 

Sharepoint 2010 : Building a .NET Connectivity Assembly (part 5) - Define Entity Metadata

2/19/2014 3:33:45 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
Define Entity Metadata

Before we redeploy our assembly, we need to make another important change. Even though we’ve updated the metadata to use the WebResult object as our Entity class, we haven’t added metadata defining the properties of the WebResult object. We need to update the WebResult Type Descriptor with details of the fields on the object that we want to allow clients to use.

  1. Open up the model. In the BDC Explorer pane, navigate to the WebResult Type Descriptor defined on the ReadItem method. Right-click the Type Descriptor node and select Add Type Descriptor. This will add a child-type descriptor object that we can use to declare details of a field.

  2. Add the following type descriptors:

    NameType Name
    DateTimeSystem.DateTime
    DescriptionSystem.String
    DisplayUrlSystem.String
    TitleSystem.String
    UrlSystem.String

  3. In the properties for the Url type descriptor, set the Identifier to itemUrl to declare this as the identifier for the entity.

  4. Now that we’ve updated the WebResult type descriptor for the ReadItem method, we need to copy this information to the ReadList method. Thankfully the BDC Explorer tool allows us to copy and paste descriptors. Delete the existing WebResult descriptor from the ReadList method, and then copy the WebResult descriptor node on the ReadItem method.

  5. Navigate to the WebResultList node on the ReadList method. Click to highlight it, and then paste the WebResult node.

  6. We’re now good to redeploy our completed connectivity assembly. Choose Build | Deploy BingConnectivity.

Once the solution has been deployed, we can see in SharePoint Designer that the fields are now available as expected. (You might need to press F5 to refresh the view to see the changes.) We can test our model by creating an External List from it. Follow the procedure discussed in the section “Create an External List.”

When navigating to your new list for the first time, you’ll notice that it’s empty. This is expected, because the ReadList method requires a query property. So how do you set the property? In External Lists, data source filters can be defined as part of the view. If you modify the default ReadList view, you’ll find a Data Source Filters section containing a text box to enter a parameter for our Search Filter. Type a search query in the Search Filter text box and save the view to see the results displayed in the list:

 
Others
 
- Sharepoint 2010 : Building a .NET Connectivity Assembly (part 4) - Create a Custom Entity Object
- Sharepoint 2010 : Building a .NET Connectivity Assembly (part 3) - Define a Method to Support the SpecificFinder Stereotype
- Sharepoint 2010 : Building a .NET Connectivity Assembly (part 2) - Create a Custom Entity Service Object, Define a Method to Support the Finder Stereotype
- Sharepoint 2010 : Building a .NET Connectivity Assembly (part 1) - Business Data Connectivity Model Project
- Windows 8 : Configuring security - Managing Windows Firewall and exceptions (part 5) - Configuring outbound rules, Configuring connection security rules
- Windows 8 : Configuring security - Managing Windows Firewall and exceptions (part 4) - Allowing the secure connection
- Windows 8 : Configuring security - Managing Windows Firewall and exceptions (part 3) - Configuring IPsec settings
- Windows 8 : Configuring security - Managing Windows Firewall and exceptions (part 2) - Modifying a firewall profile
- Windows 8 : Configuring security - Managing Windows Firewall and exceptions (part 1) - Choosing Windows Firewall
- Exchange Server 2010 : Interoperability with Earlier Versions of Exchange
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us