I demonstrated how to make an external content type programmatically during the SPC 405 - Business Connectivity Services Runtime and Object Model Deep Dive session at the 2009 Microsoft SharePoint Conference. Since the conference I have received a couple of dozen emails about the this topic. Most of the emails ask for the code samples and an explanation of the code, and at least half of the emails inquire about when and why you may need to create an external content type programmatically. Because this is obviously a hot topic I decided to write it up in a blog post.
Sample...
In part 1of this blog post series I showed you how to create a .NET Assembly Connector to read data from a flat file. This blog post shows you how to register an external content type associated with a .NET Assembly Connector with the SharePoint search search service so you can index and search the data coming from the external content type.
The Business Context
As I mentioned in part 1 of this blog post series, it’s commonplace to find critical business data stored inside flat files in large, mature organizations. In addition to being able to browse the data inside web...