I sling a lot of data in and out of my Jobs Management Application and this afternoon's slinging consisted of Job Estimate data from Microsoft Access. The process occurs through a Community Server background task and consists of three steps. 1) Request the List<Business Object>, 2) Retrieve the data to populate it in the AccessDataProvider, and 3) Pass it off to the SqlDataProvider.
I had written CodeSmith templates to perform various aspects of the Access Data Import process, but not what I call a "Composite Template" to handle the entire task. That was today's CodeSmith Composite Power Play.
I'm posting this not to discuss the import process, but to provide another demonstration of CodeSmith's muscle. Here is the template and the five properties I enter.
I click "Generate" and the result is below. Click to view actual size. You'd agree, that's a lot of code. And a point I always emphasize, the code compiles the first time and is ready for use with no additional effort, other than entering the query statement.
The numbers represent the 3 steps of the import process as I mentioned above, 1) request the List<BusinessObject>, 2) retrieve it in the Access Provider, and 3) enter it in the SQL Provider.