Friday, July 23, 2010

Programming using BCS (Business Data Connectivity) API

All Searches in Bing & Google for BCS API leads to writing .net connector to BCS. But today I had to write some complex component which required me to write code against BCS to retrieve LOB data.
I know you may ask why BCS when you already have connectivity to the source of BCS. The reason being, I wanted to use BCS to work something like an Entity model and used in context of SharePoint 2010.

Thanks to chaholl's article I was able to do perform it easily.. Here is the link for it.
http://www.chaholl.com/archive/2010/03/15/creating-a-web-service-to-access-bcs-data-in-sharepoint.aspx

Today, I also downloaded the SharePoint 2010 SDK. It comes with a lot of samples and help when programming with SharePoint. It hardly takes like 200MB of your hard drive and is definitely worth that space, if you are planning to do a lot of SharePoint coding.

Something that I came across in the SDK articles that is worth the mention,

Restrictions in BDC:
BDC does not support the ICollection or IEnumerable interfaces to represent collections in data structures, as well as the generic ICollection, IEnumerable, and IList interfaces. All collections must implement IList.
Finder method returning multiple items, we require the return value to implement either IEnumerable or IEnumerator (except for database, where we support onlyIDataReader). BDC does not support generic versions of these IEnumerable and IEnumerator.

No comments:

Post a Comment