This is an old revision of the document!
Version 3.0 of EasyQuery introduces the most essential update of the library since its first release. You can find more information about the changes we made in this document. Here we introduce a step-by-step description what changes you need to do in your project to make it compatible with version 3.0 of EasyQuery.
Such assemblies as Korzh.WebControls.CLR40, Korzh.EasyQuery.CLR40 and Korzh.EasyQuery.WebControls.CLR40 should be removed from your project. Here we have indicated only the assemblies for WebForms (ASP.NET) edition of EasyQuery and for .NET 4.0 but you need to do the same for any other edition and version of .NET framework as well. Version 3.0 assemblies have different names (see the next step for details).
Again we suppose here that your project is for .NET 4.0 and WebForms edition of EasyQuery. Use similar assembly names for other editions and .NET versions. So you need to reference the following assemblies in your project:
Since we have separated our core classes on two groups (the ones which represent the general query and data model objects and the classes which are designed to work with databases) you need to add Korzh.EasyQuery.Db namespace into the “using” section on the forms where EasyQuery controls are used:
Additionally you may need to remove the deprecated namespace
Korzh.WinControls.XControls (in case it was used in your code).
DataModel classes now represents some basic entities (not dealed to database) you need change the types of those object to
Additionally you will need to do similar changes for all data model and query objects as well, since some basic classes (like SimpleCondition or EntityAttrExpr) have become abstract so you can't create an instance of these classes anymore and need to use some their Db* descendants.
Moreover some classes which were the sub-classes before (like
DataModel.EntityAttr) now become first-level classes (
Here is the full map of necessary changes:
Since all SQL generation functionality in version 3.0 was moved into the special SqlQueryBuilder class, you can't call BuildSQL() method of the Query object to build the SQL or read it's Result property to get the generated statement. Instead of that you need to create an instance of SqlQueryBulider class and call its BuildSQL() method.
Was in version 2.x:
query.BuildSQL(); SqlTextBox.Text = query.Result.SQL;
Become in version 3.0:
SqlQueryBuilder builder = new SqlQueryBuilder(query); builder.BuildSQL(); SqlTextBox.Text = builder.Result.SQL;
Here is the map of the changes you may need to do:
That's all. Now your project must work well with EasyQuery 3.0!