This project has moved and is read-only. For the latest updates, please go here.

Using CslaGenFork with mixed Data Sources.

Apr 10, 2012 at 7:32 AM

In many cases, my projects are based on Business Objects that fetches data from Web Services developed in SAP.

So basically, most of our back-end Database are in SAP, and they are accesses via Web Services. In many other cases, we have to mix this with connection to SQL Server and Adabas DB (for Legacy data which is not yet migrated to SAP). In other cases, we have to fetch information from Active Directory and also from Lotus Notes User Directory.

So, you can imagine that in one Business Object, it may have to fetch information from 2 or 3 different Data Sources, and to perform update, we have to update such sources accordingly. But mostly for update, we are writing to a SQL Server.

Until now, I have never used Code Generator, and I am still using the Templates provided by the CSLA.NET 2.0 Download. I am updating them manually to match my case.

See this for example:

I would like to know if CslaGenFork will allow me to generate Objects in VB, and to enable me to custom develop the code needed for Data Access (CRUD) and have multiple different Data Sources in the back-end (SQL Server and Web Services), and allow easy maintenance.


May 13, 2012 at 11:07 PM

Hi Tarek,

I missed this post. Sorry about that :(

1) As we speak, CslaGenFork has no VB templates for target CSLA4.

2) In a scenario where only some data comes from SQL Server, CslaGenFork can be at some use:

  • specify your Value Properties with no DBBindColumn (do specify them only when SQL Server is the data source)
  • use the pseudo-events (OnFetchPre, OnUpdatePre) to load and update data on other data sources

CslaGenFork will still handle the plumbing code and generate some very useful methods.


Tiago Freitas Leal