Work is coming along quite nicely on our ASP.NET Design Time support for EntitySpaces 2007. Below is a screen shot of the EntitySpaces ASP.NET design time dialog that will allow you to setup your databinding mappings for grids, detail forms, and other controls in ASP.NET. Notice the image shows a GridView being bound to our new esDataSource control right within Visual Studio.
The esDataSourceDesigner control uses reflection to locate all of the classes derived from the EntitySpaces esEntityCollection class. However, the esDataSource uses NO reflection. The design time support is in a separate assembly that does not need to be present for runtime and therefore has no bearing on our medium trust support. The design time dialog will allow you to choose which collection to use in your binding. After choosing the desired collection you can then choose which columns to display. Once you select "Ok" the grid will then add the columns you have chosen as bound columns and also populate the grid with some design time only data so you can see the layout.
The above image is what you will see when you select the "Columns" property in the GridView's options dialog. You can then further customize the order and all of the "normal things" in here as well. Also, Below you can see the DataKeyNames dialog being used to pick the primary keys in the grid.
And finally, EntitySpaces has taken a wiser path than some of the other implementations. The suggested approach by Microsoft is that folks build their queries in the dialog for updates, selects, deletes and so on? Thus, we would have had to have come up with some crazy "text based" query mechanism that is the equivalent of our dynamic query API. This is a non-starter. Instead, we provide a few key events that are called at the appropriate times that will allow you to use our familiar dynamic query API in code (as it should be).
Our esDataSource_Select even is used to create our CatagoriesCollection and then load it any way we see fit. We set the esDataSourceSelectEventArgs Collection property to our loaded collection.
e.Collection = cats;}
There is currently only one other event that needs hooked up and that is the CreateEntity event. However, we are providing many more events that will allow you to fully customize everything if you desire to. However, you will only need to handle two or three events to have a fully editable grid or other control working with add/edit/delete functionality. This will be included in our next EntitySpaces 2007 beta. There are a few issues of course still that we are still working out but our thinking is this is really going to power-up your ASP.NET development.
Page rendered at Tuesday, March 16, 2010 8:13:50 PM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.