Code Generation

Typed DataTable's base class in VS008

I have a typed Dataset, generated by VS Designer. Resently I've added a new column to one of the tables, and suddently in different DLLs where the dataset was used, I've started to get Error 22 The type 'System.Data.TypedTableBase... is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.DataSetExtensi... Version=, Culture=neutral, PublicKeyToken=b77a5c561934... Apparently VS 2008 changed the base class for Typed DataTables 3.5 : public ......

EnitySpaces: the same Query can be used to save multiple tables

I wanted to minimize number of calls to the database, but get back results of dynamic query for small number of columns, as well as detailed data(e.g Itinerary table and Itinerary joined with Itinerary items) .In EntitySpaces I've created a where condition, filled Query and loaded detailed data, then saved the returned table to DataSet. Then for the same query I've specified distinct select columns and Load it again(When LINQ will be available, it could be done in memory without extra database call). ......

NullReferenceException in EntitySpaces_C#_ASPX.csgen template after copy template instance

I am using MyGeneration Project to generate admin web pages using EntitySpaces Templates for ASP.NET . Filling templates is very time consuming, and I decided to copy template instance for one table as a start point for other table. It didn't save much , because it require you to do everything differently for each table anyway. And it also causes an errors. I've done selections im multiple tabs, but when I Executed template instances, I've got errors **ERROR*** [NullReferenceException] Object reference ......

Don't forget add EntitySpaces operands to Where method.

In EntitySpaces you can specify filter to load data. I've wrote the following code EmployeesCollection collection = new EmployeesCollection(); Collection.Query.LastName.L... collection.Query.Load(); and couldn't understand why the filter doesn't work. The reason is that functions similat to Like, LessThan return esWhereItem that will work only after they passed to esDynamicQuery.Where(Object... method.So the correct code must be Dim collection As EmployeesCollection = New EmployeesCollection() ......

Exclude non-stringable columns in EntitySpaces templates.

In MyGeneration template for EntitySpaces (see Template: Ajax Auto Complete WebServices using EntitySpaces) I wanted to loop through all columns of the table but exclude those that can not be converted to string(e.g TimeStamp).It's can be done by calling EntitySpaces esPlugIn methods IsObjectType and IsArrayType foreach(IColumn col in cols) { if(!esPlugIn.IsArrayType(col) && !esPlugIn.IsObjectType(col)) {//exclude fields like TimeStamps //put your code here } } ......

Code Generator for ASP.NET application

I had a requirement to find Code Generator that will help to port existing quite big fat client application to ASP.NET and to support multiple databases. The site provides quite a big list of applications that claims to do this. I also was pointed by Paul Wilson's posts (How do you decide what features to add or cut?, Debate: O/R Mapping or Code Generation and others) that Dynamic SQLs in O/R mappers allow to avoid hundreds of CRUD stored procedures and DAL classes.Unfortunately, ......