Saturday, May 13, 2006

 

EntitySpaces 1.4 initially was targeted for May 31st, however, we had to make some adjustments. Hierarchical support is now the main focus of our next release (1.5). Also, the ASPX templates are still underway and will be released separately before the 1.5 release. We had also planned on doing some databinding work as well but that has been pushed to 1.5 as well. However, all that said this is a terrific release, we have some very good features, a few fixes, and even a new MySQL provider in 1.4. See the release notes below for the details.         


·          EntitySpaces 1.4

o         Added templates to provide full VB.NET support

§          Includes a full set of Custom, Generated, and MetadataMap templates.

§          It is no longer necessary to pre-compile the generated code under C#.

§          Note: If you are using VBExpress, we recommend opening your Project Properties, selecting the Application properties tab, and clearing the Root namespace that the IDE set by default. That way, when you add “Imports BusinessObjects” to your code, it will work as expected.

o         Added an EntitySpaces provider for MySQL.

§          Works with MySQL 4.x using DynamicSql mode.

§          Works with MySQL 5.x and supports both DynamicSql and StoredProcedure modes, as well as Views.

o         Added an EntitySpaces Template to produce MySQL 5.x stored procedures.

o         Fixed stored procedure parameter name prefix handling for SQL Server, Oracle and Access.

o         Fixed parameter name handling for column names with spaces.

o         Added output parameter support to esParameters.         

public string GetFullName(int employeeID)
{
   
esParameters parms = new esParameters();

   
parms.Add("EmployeeID", employeeID);
   
parms.Add("FullName", esParameterDirection.Output, DbType.String, 40);

   this.ExecuteNonExec(esQueryType.StoredProcedure, "proc_GetEmployeeFullName", parms);

   return parms["FullName"].Value as string;
}

o         Fixed an obscure bug in Transaction Manager. (Special thanx to Graham Scragg and Thomas Coats for working with us on this.)

o         Improved Exception handling. We no longer wrap the exceptions which will make it much easier for you to see the real exception.

o         Updated and improved compiled help.

 

 

·          DotNetNuke

o         Includes an EntitySpaces ControlPanel module for DotNetNuke.

§          Displays EntitySpaces assembly information.

§          Allows you to upload/update EntitySpaces assemblies.

§          Allows you to encrypt/decrypt connection information in config files.

o         Added new template to create Sql scripts for DotNetNuke module development.


 

·          ASP.NET

o         Includes ASP.NET code for an EntitySpaces ControlPanel.

§          Displays EntitySpaces assembly information.

§          Allows you to update EntitySpaces assemblies.

§          Allows you to encrypt/decrypt connection information in config files.


 

·          EntitySpaces SqlDemo

o         Includes code demonstrating encrypting/decrypting app.config connection information.

o         Note: If SqlDemo is run from within Visual Studio, SqlDemo.vshost.exe.config gets encrypted. This file is only used by Visual Studio and should never be distributed with your application. To encrypt SqlDemo.exe.config, run SqlDemo.exe directly from the bin\Debug folder.


 

·          EntitySpaces Test Suite

o         Updated the test fixtures and added NUnit projects to test the EntitySpaces provider for MySQL.

o         Duplicated the C# tests in VB.

Note: Installation instructions at the bottom of the Release Notes for 1.4 contain special instructions for MySQL users. They explain how add the required Language Mapping to MyGeneration.


posted on Saturday, May 13, 2006 11:49:34 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, May 11, 2006

Wow, so many good things to talk about for the upcoming EntitySpaces 1.4 drop. Another addition, is a complete template to generate DotNetNuke ready install scripts for any of your EntitySpaces business objects. It works just like any of our other stored procedure templates, and will allow you to generate a DNN ready script for all of your tables/stored procedures in one fell swoop. We previously mentioned that we will also be releasing native vb.net templates for ES with 1.4, so what are you waiting for DotNetNuke module developers? Quit wasting your time writing buggy, un-tested object persistence code and do it the easy way. ES 1.4 is scheduled to hit on Monday 05/15, get ready.

posted on Thursday, May 11, 2006 9:31:07 AM (Eastern Standard Time, UTC-05:00)  #   
In order to facilitate further simplification of the setup/upgrading of EntitySpaces in your DotNetNuke portal or plain ol' ASP.NET application we are please to announce that we will also release the EntitySpaces Control Panel.


This module/page will show you what EntitySpaces assemblies you have available and the versions of those assemblies. It will also allow you to upload assemblies when you are ready to update EntitySpaces. Lastly, and perhaps the coolest feature, is that this module will actually encrypt/decrypt the EntitySpaces connection info section of your web.config for you. We are just putting the finishing touches on the 1.4 drop and starting to package everything up for distribution, so you can expect to see this soon. We will have a DotNetNuke installable version, as well as an aspx page you can use in your ASP.NET projects. Winformers? Don't think we forgot to spread the love around, in the SqlDemo we have also added the encryption routines so that you can add this to your winform applications if you should so desire.


posted on Thursday, May 11, 2006 9:29:56 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, April 30, 2006

Our EntitySpaces 1.3 release currently requires VB.NET folks to generate both C# and VB.NET classes. The 1.3 release works like this:

VB,NET Inheritance Tree
VB.NET Custom ==> C# Generated -> EntitySpaces.Core.dll

As of our 1.4 release VB.NET users will no longer have to generate and compile a C# class library.

New VB.NET Inheritance Tree
VB.NET Custom ==> VB.NET Generated -> EntitySpaces.Core.dll

We now have mirror image templates for C# and VB.NET. If you are a VB.NET programmer using EntitySpaces your life just got so much easier. We're still unit testing but everything looks great so far. This will also help DNN users as well.

posted on Saturday, April 29, 2006 11:30:55 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, April 21, 2006

The target date for EntitySpaces release 1.4 is scheduled for May 31st, 2006. We cannot guarantee the May 31st date but we've been pretty good at hitting our goals. The list below is what we are planning for the 1.4 release.

  • MySQL - A MySql EntitySpaces provider for 4.x and 5.x will be available. The provider will support MySQL stored procedures and views for MySQL 5.x.
  • Hierarchical support will be added. This will be done via lazy load and support many-to-one, one-to-many, and many-to-many relationships.
  • DotNetNuke
    • DNN stored procedure and table creation templates will be complete
    • A full DotNetNuke module using EntitySpaces will be provided along with all of the source code.
  • DataBinding support will be improved
  • A template will be provided that will generate ASPX pages using the GridView control

Of course, many other user suggested enhancements and bug fixes will make it into the 1.4 release. We have also purchased Demo Builder which is a great tool for making presentations. Scott will be making a series of presentations in fact on DotNetNuke and how to build modules using EntitySpaces that will come out before the 1.4 release.

Don't let that stop you from buying 1.3 today, with the price of oil going up like it is it may cost us more to ship it to you .... So buy in now while it's cheap (that's supposed to be humor)

posted on Friday, April 21, 2006 6:52:52 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, April 17, 2006

The EntitySpaces team has decided to give a free, one year, Professional version of the EntitySpaces architecture for .NET to the first three (accepted) DotNetNuke developers who build modules that use EntitySpaces. To be considered, you must send a proposal to support@entityspaces.net. Not all proposals will be accepted. We will be judging based on the following criteria:

  • Your proposal must describe how your DotNetNuke Module will use EntitySpaces to read and write to the database.
  • We must be able to host your module on our site, which means it will have to be a standard install.
  • The module must come with documentation that describes how you built it and you're experiences with EntitySpaces.

 

The contest ends May 31, 2006, so send in your proposal, and get in the running for your free version of EntitySpaces. Applicants will need to use the trial version to develop their module.

posted on Monday, April 17, 2006 10:29:52 AM (Eastern Standard Time, UTC-05:00)  #   

We just released EntitySpaces 1.3, with lots of new features, and fixes here are the complete release notes:

EntitySpaces - Release Notes for 1.3 

  • Fixed spaces in parameter names for SqlServer, Access, and Oracle.
  • Changes for text based Load(), ExecuteNonExec(), ExecuteReader(),  and ExecuteScalar() that handle both token {0} logic and named esParameter logic for SqlServer, Access, and Oracle.
  • Fixed Catalog|Schema naming in SqlServer and Oracle Enterprise  providers.
  • Fixed GUID (uniqueidentifier) handling in SQL Server, if the default is newid() they are marked as output parameters and automatically brought back in the object.
  • Added [Serialization] to the esStrings nested class in the esEntity generated classes so that Infragistics grids bind correctly.
  • Fixed error in the Dynamic SQL generation for Delete statements when composite primary keys were involved, this was fixed for Oracle, Sql Server and Access, it was using a comma where " AND " should have been.
  • The templates now inject the EntitySpaces version number into the header of the generated classes.
  • There is a new checkbox in the templates that allows you to ignore the schema and catalog in the metadata class and drive it entirely by the connection string. Checking this box is recommended if you are using SQL Server.
  • You can manually override the schema and provider in the connection string as follows:

this.MyEmployeesCollection = new EmployeesCollection();
this.MyEmployeesCollection.es.Connection.Catalog = "MyNorthwind";
this.MyEmployeesCollection.es.Connection.Schema = "User";

  • Added  some key attributes on some of the properties. 
    1. esEntity.StringFormat  -  [BrowsableAttribute( false )]
    2. esEntity.SpecialBinder -  [BrowsableAttribute( false )]
    3. esEntity.strFomat - [NonSerialized]

The Generated Entity & Collection Objects

    1. str -  [BrowsableAttribute( false )]
    2. Query -  [BrowsableAttribute( false )]
  • There are two new templates for DotNetNuke. We will be working hard in this area for the next release, any feedback on these templates by DNN folks is appreciated.



NUnit Test Suite

  • Table with 'dot' in name 
  • Columns with spaces in name 
  • Columns with underscores in name. 
  • Token {0} and named esParameter logic 
  • Inserts/updates for table with memo field. 
  • Guid Primary Keys


Documentation: 

  • Improved compiled help in esEntity and esEntityCollection areas. 
  • Tests Getting Started document.


Installation: 

New Installs:

  • Uninstall any Beta or Trial version before installing EntitySpaces.
  • Install the Binary first.
  • Source and Providers can be installed in any order after that. (They are separate downloads.)
  • You do not need to install 1.2 first.
  • The 1.3 downloads are full installs.

Upgrades:

  • Upgrading does not require uninstalling 1.2.
  • You should install 1.3 over the top of your 1.2 installation.
  • Install the Binary first.
  • Source and Providers can be installed in any order after that. (They are separate downloads.)
  • You will need to regenerate your "Generated" classes after you install.

 

If you are a DotNetNuke developer and you are looking for a kick ass O/R Mapping solution you should definately check it out. We have a free 45 day trial available to all registered users.

posted on Monday, April 17, 2006 10:19:57 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, March 25, 2006

The EntitySpaces esPlugIn for MyGeneration not only allows for end-user customization it also allows us (and eventually you) to more easily author templates for EntitySpaces. Take a look at this very simple code snippet.

<%
    ITable table = MyMeta.Databases["Northwind"].Tables["Employees];
   
    source = new EntitySpaces.PlugIn.esPluginSource(table, null); 
%>

 public partial class <%=esPlugIn.Entity(source)%> : <%=esPlugIn.esEntity(source)%>
 {

 }

The output from the template is as follows 

 public partial class EmployeesCollection : esEmployeesCollection
 {

 }

If you wanted your collections to end in "Coll" instead of "Collection" you could change the C:\Program Files\MyGeneration\Settings\esPluginSettings.xml file. The entry for collections looks like this:

<esSetting Name="sCollection" Value="Collection" />

You just need to change "Collection" to "Coll" and regenerate. While this might not seem like a real-world scenario controlling your stored procedure names is much more likely. Also, and even more importantly 3rd party developers should also use the esPlugIn API in their templates to ensure they will work with everybody's configuration.

If you really want to see how this works try the esPlugIn template for MyGeneration, it's installed with the beta, it allows you to programatically change the settings, however, settings should always be made in the esPluginSettings.xml file. You can use the template to play around with the settings to get things the way you like them. We recommend the settings we've shipped with however, but the escape hatch is there for you.

The help file for the esPlugIn.dll is on your windows menu if you have installed EntitySpaces, it is also online at http://www.entityspaces.net/Documentation/esPlugIn/index.html 

posted on Saturday, March 25, 2006 9:59:40 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, March 19, 2006

Oracle uses Sequences for auto-incrementing, however, unlike SQL Server you cannot assign them as a column property or a default value. Therefore the MyGeneration code generator has no idea that you want to use an Oracle Sequence as an identity column value. Take a look at the "SeqTest" table below, the ID column is defined as the primary key. We want to use the ID column as an Identity or AutoIncrement column and we also want to use our timestamp column for concurrency checking. Can EntitySpaces handle this? You bet.

Take a look at our "SeqTest" Oracle table below.

CREATE TABLE "TEST"."SeqTest"

    "ID" NUMBER
    "TimeStamp" NUMBER
    "Data" VARCHAR2(100),  

    CONSTRAINT "PK" PRIMARY KEY ("ID") VALIDATE ,

    CHECK ("ID" IS NOT NULL) VALIDATE ,

    CHECK ("TimeStamp" IS NOT NULL) VALIDATE ,

    CHECK ("Data" IS NOT NULL) VALIDATE

)

 

Our Oracle Sequence.

 

CREATE SEQUENCE "TEST"."SEQ_ID" NOCYCLE NOORDER CACHE 20 NOMAXVALUE MINVALUE 1 INCREMENT BY 1 START WITH 1

 Below is an image of the MyMeta Browser open in MyGeneration with our SeqTest Selected. 

Because Oracle has no real metadata itself to indicate the AutoIncrement column or Concurrency column information we need to store some user metadata in MyGeneration so that the EntitySpaces templates will know what to do. To do this we put a few name/value pairs in the MyGeneration User Metadata indicating that we want to use the "SEQ_ID" Oracle Sequence as our Identity or AutoIncrement Column value and to indicate that we want to use the TimeStamp column as our concurrency column. These entries are placed at the table level, in the user metadata simply by clicking on the table with the User Meta Data window and entering values similiar to those shown below.



Let's examine these two name/value pairs:

AUTOKEY:ID / SEQ_ID      = Treat the ID column as an AutoIncrement Column and use the SEQ_ID sequence to get the value.
CONCURR:TimeStamp / 1  = Treat the TimeStamp column as a concurrency column and bump it's value by 1 upon each update.

Now let's take a look at what effect these two name/value pairs have on our insert and update statements.

The INSERT statement.
Notice that the SEQ_ID sequence is used to populate the pID parameter's value and that the pID parameter is also declared as an OUT parameter so that it can be brought back after the insert statement completes. The pTimeStamp parameter is also assigned to 1 and declared as an OUT parameter for the same reason.

CREATE PROCEDURE "TEST"."proc_SeqTestInsert"
(

    pID OUT "SeqTest"."ID"%type,
    pTimeStamp OUT "SeqTest"."TimeStamp"%type,
    pData IN "SeqTest"."Data"%type
)
IS
    BEGIN

      SELECT SEQ_ID.NextVal INTO pID FROM DUAL;
      pTimeStamp := 1;

      INSERT INTO "SeqTest"
      (
        "ID",
        "TimeStamp",
        "Data"
      )
      VALUES
      (
        pID,
        pTimeStamp,
        pData
      );
   END;

The UPDATE statement.
This bumps the TimeStamp column by 1 but not before it compares the current TimeStamp value to make sure it hasn't changed since we last read the data (in the Where statement). The pTimeStamp parameter is also declared as an OUT parameter to ensure that the new value is brought back after the update is complete.

CREATE PROCEDURE "TEST"."proc_SeqTestUpdate"
(

    pID IN "SeqTest"."ID"%type,
    pTimeStamp IN OUT "SeqTest"."TimeStamp"%type,
    pData IN "SeqTest"."Data"%type
)
IS
    pConncurrency "SeqTest"."TimeStamp"%type := pTimeStamp;

    BEGIN
      UPDATE "SeqTest"
      SET
        "TimeStamp" = "TimeStamp" + 1,
        "Data" = pData
      WHERE "ID" = pID
        AND "TimeStamp" = pConncurrency;

      IF SQL%ROWCOUNT = 1 THEN
         pTimeStamp := (pConncurrency + 1);
      ELSE
         Raise_application_error(-20101, 'NO RECORDS WERE UPDATED');
      END IF;
    END;

These are the stored procedures generated by the EntitySpaces Oracle stored procedure template, however the same holds true for the EntitySpaces dynamic sql generation, it works the same way.

 

posted on Sunday, March 19, 2006 9:27:11 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, March 04, 2006
Source code for EntitySpaces unit tests to be released.
posted on Saturday, March 04, 2006 12:48:16 AM (Eastern Standard Time, UTC-05:00)  #