A quick update on LLBLGen Pro
You might have heared about the DAL generator I released last year, LLBLGen, which as a surprise to me, became a worldwide success (over 25,000 downloads). I'm currently busy developing its big brother LLBLGen Pro, which should be released later this summer. As a quick update on what this successor is capable of, some lines of example code which uses some generated code (entities, collections) that is produced with an alpha version of LLBLGen Pro.
It loads a collection of entity objects (that's right, normal entity classes) of the type OrderDetail, from the Northwind database, which contain references to the product with ID '24', binds it using databinding to a datagrid in a form, which allows full editing of the OrderDetail objects, and after that, all changed objects are saved using an embedded transaction to the persistent storage using a single line of code. I think it's pretty neat :) Of course this is one of the many ways to retrieve / construct entity objects using the O/R mapper code generated by LLBLGen Pro. More updates later on.
OrderDetailCollection collection = new OrderDetailCollection();
ProductEntity product = new ProductEntity(24);
// ...
collection.GetMulti(null, product);
DatabindTester dbtester = new DatabindTester();
dbtester.OrderDetailEntities = collection;
dbtester.ShowDialog();
// ...
// in the dialog:
public OrderDetailCollection OrderDetailEntities
{
get { return _orderDetailEntities; }
set
{
_orderDetailEntities = value;
binderGrid.DataSource = _orderDetailEntities;
}
}
private void saveButton_Click(object sender, System.EventArgs e)
{
_orderDetailEntities.SaveMulti();
}
All queries are generated dynamicly, all code is using several patterns like the DAO pattern and the strategy pattern. Everything is developed internally using interfaces.