Introduction
In this tutorial we will go through how to connect to your External System using BCS Meta Man, we won’t be doing any configuration of our model, we will just be looking at the quickest way to get your External Systems data into SharePoint using a .Net Assembly Connector as easily as possible.
Prerequisites
- SharePoint Server 2010
- Visual Studio 2010 Professional or higher
- BCS Meta Man
- AdventureWorks SQL Database
Walkthrough
- Open Visual Studio 2010
- Add a New Project
- Select ‘SharePoint’ > ‘Lightning Tools (2010)’ , now you can select the BCS Meta Man project type.
- Give your project a name i.e BCSMetaManDemo
[Please click the images for a larger view]
- Click ‘OK’
- On the next dialog box, enter the name of where you want to deploy your model, and make sure you select ‘Deploy as a farm solution’ , click ‘Finish’
- To show the ‘BCS Meta Man Data Source Explorer’ we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way.
- Click the ‘Add Connection’ button to show the ‘Connection Dialog’
- Select the Data Source type, enter your Server name and also select whether to ‘Use Windows Authentication’ or you provide logon credentials, click ‘Connect’
- The Data Source Explorer will now be populated with your Server data
- We will be working with the ‘Product’ table, to add it to the Model , just drag it from the ‘Data Source Explorer’ onto the ‘Diagram’
- When you drop the table you will be shown the following dialog, we want to choose ‘.Net Assembly’ , click ‘OK’
(Database can be used if you want to create a model which connects straight to your External System without using a .Net Assembly i.e no code solution) - Accept the default ‘Identifiers’ by clicking ‘Next’
- Accept the default 3 methods to be created, click ‘Generate’
The default 3 methods are:
- Finder – Returns all items
- Specific Finder – Returns a single item by identifier
- IdEnumerator – Returns just the Identifiers for all of the items
- Watch as the code is generated for you, think of the time it is saving!
- Press F5 to deploy, this will load up your SharePoint Page once deployed
- Add a new Business Data List Web Part to your SharePoint page
- Click on the ‘Open the tool pane’ link
- Click on the icon to show the available External Content Types
- Select our BCSMetaManDemo.ProductsModel.Product External Content Type, click OK
- Click ‘OK’ on the tool pane
- Your External System data is now displayed in the SharePoint Web Part