Thursday, October 11, 2012

Tell all of your friends and colleagues about the 100% free version of EntitySpaces which can be found on download.com. Let them know that they get both EntitySpaces Studio and EntitySpaces Profiler. The source code is included with the install as well.

The code has been published on github as well:

The Architecture Only Repository

https://github.com/EntitySpaces/EntitySpaces-Architecture

The Complete System and Architecture

https://github.com/EntitySpaces/EntitySpaces-CompleteSource

Build instructions will soon be added to the Complete System above.

EntitySpaces could become more popular than ever now that it’s 100% free, but folks need to find out about it, and that’s where you come in. If the community behind it becomes large enough then EntitySpaces will continue. Developers will issue pull requests on the github repositories above and continue to improve EntitySpaces. It can happen, but not without a word of mouth campaign. We understand if you are looking to switch horses, but for those of you who love working with EntitySpaces as much as we do the best way to ensure it lives on for many, many years to come is to get a large community behind it.

posted on Thursday, October 11, 2012 3:06:55 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, September 21, 2012

EntitySpaces, LLC will be dissolving as of 12/31/2012. Here are the steps that EntitySpaces, LLC plans to take:

  1. EntitySpaces, LLC will release EntitySpaces 2012.1.0930.0 (possibly with a few fixes) with no serial number checking logic or active licensing.
  2. EntitySpaces, LLC will post this version of EntitySpaces on CNET's download.com for anyone to download free, it will be full featured.
  3. EntitySpaces, LLC will post the full Source Code for EntitySpaces, including the Visual Studio Add-In, under the modified BSD license and will be made available on github.

By 12/31/2012 the http://www.entityspaces.net site will no longer be available in it’s current form. The www.entityspaces.net domain will be moved to an inexpensive server and exist only to send a “success” value back to validate existing licenses. This licensing site will be kept alive until at least June of 2013. You will need to have migrated to the free version of ES2012 mentioned before June of 2013 to be able to continue to generate your EntitySpaces classes, services and alike.

EntitySpaces

posted on Friday, September 21, 2012 1:17:30 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, February 28, 2012

We are pleased to announce the release of EntitySpaces 2012. The version number is 2012.1.0229.0, we just couldn’t pass up the leap year day as a target date. There are many changes and enhancements in this release.

New Help System

One of the first things you will notice is our new help system, which is going to be updated often and independently of our EntitySpaces releases. The new help is available from the “EntitySpaces 2012” menu after installation and links to the online system here. The “Users Manual” section will expand rapidly over the ensuing months with updates occurring regularly. Watch our twitter account for tweets regarding on new pushes. You will really like the powerful search mechanism and favorites section. The EntitySpaces API is integrated as well.

EntitySpaces.js

We have a set of new templates for creating JSON based WCF Services and for creating the new “entityspaces.js” javascript classes. There is a sample application as well that shows off the entityspaces.js architecture. The entityspaces.js javascript classes support the full hierarchical model as well as lazy loading, row level dirty tracking, column level dirty tracking, and much more. Now that this release is out the door will be begin demonstrating how this can be used under node.js when running under a Microsoft OS and we will be adding support for non Microsoft platforms by writing low level providers in JavaScript. For more information on entityspaces.js see our github repository here.

Query Sandbox

This is a new application that will save you a lot of time by allowing you to quickly prototype your EntitySpaces Dynamic Queries without having to recompile and execute your application over and over again. The Query Sandbox is available on your “EntitySpaces 2012” menu after installation. There is also a video demonstrating how to use it in the “Video” section of the “EntitySpaces 2012” menu. The Query Sandbox allows you to write EntitySpaces Dynamic Queries and execute them quickly. You can even write queries and simply have them parsed so you can see the SQL it will result in without actually hitting the database.

Provider Updates

We updated many of our EntitySpaces data provider bindings to the latest ADO.NET providers.

Provider

Version

Download Link

Npgsql.dll (PostgreSQL)

2.0.11.92

http://pgfoundry.org/frs/?group_id=1000140
System.Data.SQLite.dll (SQLite)

1.0.79.0

http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
MySql.Data.dll (MySQL)

6.4.4.0

http://www.mysql.com/downloads/connector/net/

Consequently, we dropped support for the EffiProz database. The database is no longer being supported by it’s development team.

Minor Tweaks

We added a new flag that can be set that globally effects your application. You only have to set this new flag to “true” once in your application to enable this functionality.

bool esEntity.ConvertEmptyStringToNull = false;

The above is a static (or shared) property that operates as follows (it is set to false by default, which is how EntitySpaces has always functioned):

  1. Any string properties on your entities set to an empty string “” are set the null when this flag is true.
  2. For performance reasons we do not check the metadata collection to ensure the column can accept nulls, we assume if your column is a non-nullable column you will actually set it to a non-empty string.

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in C#, VB.NET, and JavaScript. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

-- The EntitySpaces Team

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net
http://www.entityspaces.net/blog
https://github.com/EntitySpaces/entityspaces.js
http://twitter.com/#!/entityspaces

posted on Tuesday, February 28, 2012 11:30:28 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, February 17, 2012

EntitySpaces LLC is announcing a one-time, special offer on February 29th, 2012. We are giving away 1,000 EntitySpaces Studio Licenses for free. See http://www.entityspaces.net for more information on EntitySpaces Studio.

Why are we doing this? One reason… we feel so strongly that once we put EntitySpaces into the hands of developers (including our new entityspaces.js JavaScript Data Access System), a good portion of them will become the best PR team we could ever have.

Here’s how the special offer works:

  1. The first 1,000 emails sent to specialOffer@entityspaces.net BETWEEN 10:00 AM EST and 11:59 PM EST on Feb 29th, 2012 are eligible for the special offer providing they meet the following criteria.
  2. Only one license per domain name will be eligible. For example, you cannot receive two free licenses for “yourcompany.com”.
  3. Domain names such as yahoo.com, hotmail.com, gmail.com, and other generic email systems are not eligible. The domain name of the email id sent must be from a real company domain. We will review all emails to see if they meet these criteria, domain names that point to generic blank sites at hosting companies will not be chosen. We withhold the right to decide which domain names are eligible.
  4. The domain names cannot already belong to EntitySpaces customers.
  5. The emails that are chosen as winners will then need to register on our site (we never provide this information to anyone) with the same email ID sent to specialOffer@entityspaces.net in order to be granted download access to EntitySpaces Studio.
  6. The licenses are non-transferrable.

Your EntitySpaces Studio license allows a single developer to activate your serial number on two machines, for instance, one on your desktop and one on your laptop computer. The license allows you to run EntitySpaces Studio forever. You can download all upgrades, major or minor, for 1 year at no cost. There are no royalties on the runtime redistributable DLL’s.

Our first EntitySpaces 2012 release will be available on Feb 29th. EntitySpaces supports MS SQL Server, Azure, CE, MS Access, Oracle, PostgreSQL, Sybase SQL Anywhere, MySQL, SQLite, and VistaDB, and these can all be used for entityspaces.js.

So, if you are interested in this one-time special offer, mark your calendar and set your alarm (if need be). Remember, only the first thousand emails sent BETWEEN 10:00 AM EST and 11:59 PM EST on Feb 29th, 2012 are eligible, providing they meet the above criteria.

See https://github.com/EntitySpaces/entityspaces.js for more information on entityspaces.js (including videos and live samples).

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net
http://www.entityspaces.net/blog
https://github.com/EntitySpaces/entityspaces.js

posted on Friday, February 17, 2012 7:41:35 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, December 06, 2011

For those interested in beginning a project with Punchout and the EntitySpaces JSON Framework (we’ve yet to name it) here is a quick tutorial. This following is Javascript code and the methods that start with “es” are contained in the “entityspaces_ko_utils.js” file on the Punchout github repository. The code below is fetches a single entity, and then show how it is managed through the process of editing it and then saving it back to the database. But first the code, it’s quite simple actually.

function onClick() {

    // Load Employee with Primary Key = 2
    var employee = es.makeRequest(service, 'Employees_LoadByPrimaryKey', ko.toJSON(2));

    // Make everything Knockout Observable (and therefore bindable to HTML elements)
    employee = ko.mapping.fromJS(employee);

    // Let's track the state (Modified Columns)
    employee = es.trackState(employee);

    // Change the first name, we use FirstName() because it is an observable now
    employee.FirstName("Suzie");

    // Convert the employee back to JSON
    employee = ko.mapping.toJSON(employee);

    // Now Save it
    employee = es.makeRequest(service, 'Employees_Save', employee );
}

That's it. Now let’s break it down line by line. First we fetch the employee with a primary key of 2.

  • var employee = es.makeRequest(service, 'Employees_LoadByPrimaryKey', ko.toJSON(2));

If we look at employee in the Javascript debugger we see:

image1

and the entity looks like this in JSON

{ "EmployeeID" : 2,
  "FirstName" : "Sally",
  "HomePhone" : "A",
  "LastName" : "Keller",
  "RowState" : 2
}
  • employee = ko.mapping.fromJS(employee);

The above code uses Knockout to make everything observable. If we look at employee in the Javascript debugger we see:

image2

Notice the __ko_mapping__ section and that all of the properties are now observable

and the entities JSON now looks like this

{ "EmployeeID" : 2,
  "FirstName" : "Sally",
  "HomePhone" : "A",
  "LastName" : "Keller",
  "RowState" : 2,
  "__ko_mapping__" : { "mappedProperties" : { "EmployeeID" : true,
          "FirstName" : true,
          "HomePhone" : true,
          "LastName" : true,
          "RowState" : true
        } }
}
  • employee = es.trackState(employee);

Let’s enable row level and column level tracking.

If we look at employee in the Javascript debugger we see:

image3

Notice that we now have an array called ModifiedColumns. What you don’t see is that es.trackState() attached property_change events to track all of your columns. This is exactly what EntitySpaces does in .NET code as well.

and the entities JSON now looks like this:

{ "EmployeeID" : 2,
  "FirstName" : "Sally",
  "HomePhone" : "A",
  "LastName" : "Keller",
  "ModifiedColumns" : [  ], // <= HERE
  "RowState" : 2,
  "__ko_mapping__" : { "mappedProperties" : { "EmployeeID" : true,
          "FirstName" : true,
          "HomePhone" : true,
          "LastName" : true,
          "ModifiedColumns" : true,
          "RowState" : true
        } }
}
  • employee.FirstName("Sally");

Notice, because our properties are observable we use parenthesis when we modify them.

If we look at employee in the Javascript debugger we see:

image4

Notice above that the RowState proprety changed from 2 (unchanged) to 16 (modified). This happens because earlier we called es.trackState() on the entity. This is the Row level state tracking.

and the entities JSON now looks like this:

{ "EmployeeID" : 2,
  "FirstName" : "Suzie",
  "HomePhone" : "A",
  "LastName" : "Keller",
  "ModifiedColumns" : [ "FirstName" ],
  "RowState" : 16,
  "__ko_mapping__" : { "mappedProperties" : { "EmployeeID" : true,
          "FirstName" : true,
          "HomePhone" : true,
          "LastName" : true,
          "ModifiedColumns" : true,
          "RowState" : true
        } }
}

Notice that “FirstName” is in the ModifiedColumns array, this is the column level dirty tracking.

  • employee = ko.mapping.toJSON(employee);

Now we un-map the entity and convert it JSON, and the “employee” now looks like this:

{ "EmployeeID" : 2,
  "FirstName" : "Suzie",
  "HomePhone" : "A",
  "LastName" : "Keller",
  "ModifiedColumns" : [ "FirstName" ],
  "RowState" : 16
}
  • employee = es.makeRequest(service, 'Employees_Save', employee );

Finally, we call our Employees_Save method on our JSON based WFC Service to commit the changes, which incredibly, is this simple:

public Employees Employees_Save(Employees emp)
{
    emp.Save();
    return emp;
}

Could it be any easier? Notice we return “emp” back to the caller in our Employees_Save() method, this returns auto_key values, default columns, and alike after an insert, or even a potential update.

You can see the demo HERE …

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, December 06, 2011 11:03:42 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, December 04, 2011
KICK IT !!
SHOUT IT !!

The Punchout Grid (and coming suite of controls) are written using JavaScript and leverage Knockout 1.3. If you are not familiar with Knockout yet you really should check it out. Punchout is licensed under the MIT license. This means anyone can use Punchout for free including in commercial applications. EntitySpaces, LLC is the sponsor and will be overseeing the development of Punchout on github. The design approach is such that Punchout can be used with or without EntitySpaces. However, the EntitySpaces team is creating a compelling story for using EntitySpaces, Punchout, and Knockout together to get incredibly smart web applications. This will all unfold over the next several months. This will be a significant focus of EntitySpaces 2012. However, it will not be the only focus, many more improvements are coming including those in the ES2011 wish list which didn’t make it into our last release.

The system we are creating is a terrific way to write web applications, it’s extremely fast, maintainable, and forward looking. Who would have thought that HTML and JavaScript would be the future? Nonetheless, that is a significant path toward the future. The Knockout Beta 1.3 System has already been downloaded 45,000+ times and is very popular among .NET developers because of the familiarity of the MVVM model used in Silverlight and WPF.

Punchout Early Adopters Program

First, if you don’t already own EntitySpaces, an extended full featured trial version will be provided to your team if you are accepted into the early adopter program. Of course, existing customers are welcome too.

Though still in its infancy, this new system (we have yet to name it) provides an excellent way to write HTML/JavaScript applications using the familiar MVVM model while leveraging EntitySpaces as the data source  serving up your entities in JSON format. Our early adopters program will provide participants with free licenses for EntitySpaces once they go “live”. Each company accepted to participate in the early adopter program will receive:

  • Up to Five EntitySpaces Studio Licenses depending on your team size. 
  • Up to Five EnititySpaces Profiler Licenses depending on your team size.

That’s a potential value of $1,992.00 dollars. Those are not trial version but real production versions.

The early adopter program will officially begin in mid-to-late January 2012. If you are interested in participating in the EntitySpaces “Punchout Early Adopters Program” you can email us by clicking here. Early adopters must go live on the “production” Punchout System, be willing to work with us closely in testing, and contribute to the Punchout Grid on github to be eligible for the free licenses. The Punchout Grid itself will receive a lot of attention and is probably where you can help the most. If you have good HTML/Javascript skills we think you will enjoy working with us on the Punchout Grid. We will be creating new EntitySpaces templates to generate your Punchout WCF JSON Services which will use EntitySpaces to access the data. Punchout already knows how to talk to our services and auto-page and auto-sort for you automatically. The early adopter program could go on for 3 to 6 months so keep that in mind. The early adopters program will have a limited number of participants and larger teams of developers will be preferential, however, don’t let that prevent you from applying.  More details to follow.

If you are starting a new application and want to use this new architecture suite now is an opportune time to get involved. Knockout 1.3 is on the cusp of release so the timing is perfect.

The diagram below shows the basic design philosophy behind Punchout. Certain objects like pagers and sorters can be attached to enable the Punchout Grid to work with Entityspaces or any other data source. The Punchout Grid itself knows nothing about EntitySpaces nor does it include the Entityspaces Javascript file.

architecture

Two Sample Grids

We have created two samples that demonstrate using Punchout with and without EntitySpaces. NOTE: You might get an error or two, but remember, this is pre-alpha code. We have mostly been doing proof of concept work.

The Punchout Grid using EntitySpaces

The EntitySpaces enabled sample (see link below) allows you to sort by clicking on the Punchout Grid headers, select rows, add new records, delete existing records, and modify existing records. If you try to delete a record and it doesn’t actually delete that means it has foreign keys to other data and cannot be deleted (we are not returning error messages yet) a minor issue. The EntitySpaces sample uses the approach above shown in the diagram and uses the EntitySpaces dataPager and dataSorter …

See http://www.entityspaces.net/Punchout/examples/EntitySpaces/SampleGrid.htm

The Punchout Grid without EntitySpaces

This sample binds to a static view model within the HTML page itself, it looks like this and matches the format returned from the EntitySpaces WCF JSon based WCF Service(s). You can view the source for the page at the link. Notice the columns collection, this contains the metadata that will allow the Punchout Grid to do an auto-layout (which will greatly improve over the months to come). We haven’t added the client side sorting required by the default Punchout DataSorter but that will be added very soon.

See http://www.entityspaces.net/Punchout/examples/Non-EntitySpaces/SampleGrid.htm

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, December 04, 2011 7:26:32 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, December 01, 2011

To see the demo click here: http://www.entityspaces.net/Punchout/examples/Non-EntitySpaces/SampleGrid.htm

The first grid is talking to a WCF JSON Service hosted on our site, the 2nd grid is using all client based data.  The only difference between the two grids is which dataPager is used. The standard Punchout grid uses the punchout pager which is client side based. The first grid uses the es.dataGrid and automatically pages for you.  If you are considering starting a new project in 2012 and want to go HTML5/JavaScript then definitely consider using our Punchout/Knockout EntitySpaces system, it’s going to be fantastic.

First the HTML to add our Punchout Grid to our page, notice we bind it to our myView1 MVVM model via Knockout.

<div data-bind="poGrid: myView1"></div>

Next we have the the Javascript section to setup the grid to auto-page from our JSON based WCF Service.

<script language="javascript" type="text/javascript">

var viewModel1 = {
    data: ko.observableArray([]),
    columns: ko.observableArray(["EmployeeID", "FirstName", "LastName", "RowState"]), 
    headers: ko.observableArray(["Employee ID", "First Name", "Last Name", "Row State"]),
    footers: ko.observableArray(["$100.00", "$200.00", "$3.00", "$56.34"])
}

//------------------------------------------------------------------------------
// This view is going to page against an EntitySpaces JSON WCF Service
//------------------------------------------------------------------------------
var myView1 = new po.poGrid.dataTable(viewModel1.data, viewModel1.columns, viewModel1.headers, viewModel1.footers);
myView1.pager = new es.dataPager(myView1); // Notice we use the es.dataPager here

myView1.pager.service = "http://www.entityspaces.net/Knockout/Part1/esService/esJson.svc/";
myView1.pager.method = 'Employees_Pager';

myView1.pager.enabled(true);
myView1.headerEnabled(true);
myView1.footerEnabled(true);

</script>

In the Javascript code above the columns[] will be filled in for you as well, this is all still early alpha stuff we’re showing here.  Notice we give the es.dataPager a service and method to hit. Let’s take a look at the EntitySpaces Employees_Pager method that lives in our JSON based WCF Service:

[ServiceContract(Namespace = "Services")]
public interface iesJSon
{
    [WebInvoke(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
    PagerData Employees_Pager(PagerRequest request);
}

public PagerData Employees_Pager(PagerRequest request)
{
    PagerData data = new PagerData();
    data.pagerRequest = request;

    EmployeesQuery q = null;

    if (data.pagerRequest.totalRows == 0)
    {
        // Only on the first call do we get the total record count
        q = new EmployeesQuery("e");
        q.es.CountAll = true;
        data.pagerRequest.totalRows = q.ExecuteScalar<int>();
    }

    // Prepare the query
    q = new EmployeesQuery("e");
    q.Select(q.EmployeeID, q.FirstName, q.LastName);
    q.OrderBy(q.LastName.Descending);

    // Get the page of data being requested
    q.es.PageNumber = request.pageNumber;
    q.es.PageSize = request.pageSize;

    // Load it
    EmployeesCollection coll = new EmployeesCollection();
    coll.Load(q);

    // Return it
    data.Collection = coll;
    return data;
}

That’s it. Basically, in a matter of minutes you can be paging through your data in pure HTML. No ASPX code needed. There is much more to come, stay tuned.

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, December 01, 2011 11:44:45 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, November 25, 2011

We have been waiting for Knockout 1.3 to update our Punchout system and we’re off to a nice start. We will be creating a new web site for this feature-subset called http://punchout.entityspaces.net but it has not been created yet. We think this is such a fantastic way to write pure HMTL/JavaScript applications and talk to JSON based EntitySpaces Services. Now that we have converted to KO 1.3 we are going to expand greatly on this feature-subset with:

  • A new EntitySpaces template to generate JSON based WCF Services complete with Authentication and Security built in.
  • The JSON packet will not only return the actual data, but also column names, display names, and metadata to auto-layout a Punchout grid based on the data type.
  • Column level and row level dirty state tracking (already built in but improvements are coming)

punchout_13_grid

The HTML code using the new Knockout 1.3 template syntax (we no longer rely on JQuery) is shown below for the Punchout Grid shown above. You don’t have to include the HTML in your code, it’s built into the Punchout control, all you need to include is this:

<div data-bind="poGrid: myView" />

However, the HTML (built into the Punchout Grid) is shown here for those that want to see the new syntax:

<!-- Working on new Knockout 1.3 Native Template syntax -->
<table class="es-grid" cellspacing="0">
    <thead data-bind="if: headerEnabled()">
        <tr data-bind="foreach: headers">
            <th data-bind="text: $data" >
            </th>
        </tr>
    </thead>

    <tbody data-bind="foreach: collection.slice(pager.startingRow(), pager.endingRow())">
        <tr data-bind="foreach: $root.columns, event: { mouseover: $root.OnMouseIn.bind($parent), 
                mouseout: $root.OnMouseOut.bind($parent), click: $root.OnClick.bind($root) }">
            <td data-bind="text: $parent[$data]">
            </td>
        </tr>
    </tbody>

    <tfoot data-bind="if: footerEnabled()">
        <tr data-bind="foreach: footers" >
            <td data-bind="text: $data">
            </td>
        </tr>

        <tr data-bind="if: pager.enabled()">
            <td data-bind="attr: { colspan: headers().length }" nowrap="nowrap">
                <button data-bind="click: $root.OnFirstPage.bind($root)"> << </button> 
                <button data-bind="click: $root.OnPrevPage.bind($root)"> < </button>
                <button data-bind="click: $root.OnNextPage.bind($root)"> > </button>
                <button data-bind="click: $root.OnLastPage.bind($root)"> >> </button>
                Page <em data-bind="text: $root.pager.currentPage()" ></em> of 
                <em data-bind="text: $root.pager.totalPageCount()"></em>
            </td>
        </tr>
    </tfoot>
</table>

The Javascript ViewModel is shown below. The “data” array contains the actual data brought back from an JSON based EntitySpaces WCF Service. However, in 2012, using our new WCF JSON template, you will have the option to return the column names, display names, and even metadata (not shown here) so that Punchout Grids and Detail forms can be auto-created for you. Of course, paging is built into the the Punchout Grid already and will be built into the WCF JSON Service.

<script language="javascript" type="text/javascript">

var viewModel = {
    data: ko.observableArray([
        {"EmployeeID": 1,"FirstName": "Fred","LastName": "Smith","Age": 42,"RowState": 2},
        {"EmployeeID": 2,"FirstName": "Joe", "LastName": "Smith","Age": 39,"RowState": 2},
        {"EmployeeID": 3,"FirstName": "Mike","LastName": "Griffin","Age": 26,"RowState": 2},
        {"EmployeeID": 4,"FirstName": "Sally","LastName": "BoJangles","Age": 42,"RowState": 2},
        {"EmployeeID": 5,"FirstName": "Sam", "LastName": "Rollins","Age": 39,"RowState": 2},
        {"EmployeeID": 6,"FirstName": "Mike","LastName": "Smith","Age": 26,"RowState": 2},        
        {"EmployeeID": 7,"FirstName": "Max","LastName": "BoJangles","Age": 42,"RowState": 2},
        {"EmployeeID": 8,"FirstName": "Joe", "LastName": "Smith","Age": 39,"RowState": 2},
        {"EmployeeID": 9,"FirstName": "Mike","LastName": "Smith","Age": 26,"RowState": 2},
        {"EmployeeID": 10,"FirstName": "Fred","LastName": "Smith","Age": 42,"RowState": 2},
        {"EmployeeID": 11,"FirstName": "Fred","LastName": "Smith","Age": 42,"RowState": 2},
        {"EmployeeID": 12,"FirstName": "Joe", "LastName": "Smith","Age": 39,"RowState": 2},
        {"EmployeeID": 13,"FirstName": "Pamela","LastName": "Williams","Age": 26,"RowState": 2},
        {"EmployeeID": 14,"FirstName": "Sally","LastName": "Smith","Age": 42,"RowState": 2},
        {"EmployeeID": 15,"FirstName": "Sam", "LastName": "Rollins","Age": 39,"RowState": 2},
        {"EmployeeID": 16,"FirstName": "Kelly","LastName": "Jones","Age": 26,"RowState": 2},        
        {"EmployeeID": 17,"FirstName": "Max","LastName": "BoJangles","Age": 42,"RowState": 2},
        {"EmployeeID": 18,"FirstName": "Joe", "LastName": "Smith","Age": 39,"RowState": 2},
        {"EmployeeID": 19,"FirstName": "Mike","LastName": "Smith","Age": 26,"RowState": 2},
        {"EmployeeID": 20,"FirstName": "Glenn","LastName": "Maxwell","Age": 42,"RowState": 2},        
        {"EmployeeID": 21,"FirstName": "Fred","LastName": "Smith","Age": 42,"RowState": 2},

    ]),
    columns: ko.observableArray(["EmployeeID", "FirstName", "LastName", "RowState"]),
    headers: ko.observableArray(["Employee ID", "First Name", "Last Name", "Row State"]),
    footers: ko.observableArray(["$100.00", "$200.00", "$3.00", "$56.34"]),
}

var myView = new po.poGrid.viewModel(viewModel.data, viewModel.columns, viewModel.headers, viewModel.footers);
myView.pager.enabled(true);  // default is true
myView.headerEnabled(true);  // default is true
myView.footerEnabled(true);  // default is false

ko.applyBindings(myView);

</script>

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, November 25, 2011 10:13:00 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, November 18, 2011

DocToHelpNow that our latest release (2011.1.1110.0) is out and we are heading into the Holidays the EntitySpaces team will be investing the necessary time to create a full and complete EntitySpaces users manual. It’s been a long time coming we know, and your requests have not gone unnoticed. EntitySpaces ships with working samples for the various programming models we support and we provide excellent support on our forums, however a full users manual is certainly needed. There is a lot of power hidden away in the EntitySpaces architecture that will soon come to light.

We have purchased Doc-To-Help for the team which provides us with plenty of options for delivery, including online web based help, traditional .CHM help, and PDF’s. We will utilize all three options. Doc-To-Help allows us to write each section of the help in it’s own Microsoft Word document. This will work to your advantage because we have decided to release each section as we complete them rather than making you wait for the entire help system to be created. Once it is all completed of course, we will package all of the documents up into a single integrated, searchable, help system.

Examples of what the help system will cover includes working with collections, single entities, the hierarchical model, the Dynamic Query API, transactions, serialization through proxies, non-proxies, DataContact and JSON. Using EntitySpaces in WCF scenarios including JSON based services, Silverlight, and RIA services. We will cover DataBinding in all of the various environments including using the esEntityCollectionView class and the esDataSource control, and writing database independent applications using EntitySpaces. Don’t worry if you didn’t see something in the list above, that was just a sample of the areas the help system will cover. The users manual will increase your productivity and allow you to fully leverage all of the possibilities that EntitySpaces provides you.

The wheels are already in motion so keep your eyes on our blog and twitter account for announcements of each section as they are released.

EntitySpaces

From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

The EntitySpaces Team
--

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, November 18, 2011 7:18:41 AM (Eastern Standard Time, UTC-05:00)  #   
 Monday, October 10, 2011

This morning www.entityspaces.net has a whole new look. Special thanks goes to Ann Schecter who did all of the graphics design and site layout work. Does that name sound familiar? If so here’s why, Ann is Scott’s wife. Scott had his hand in the implementation work as well but Ann is the real artist. You can see Scott and Ann’s site here http://schecterandco.com/.

You’ll notice two new logo’s that will be integrated into our products as well (the drop shadow was added by the blog for easy viewing). You can click on the images below as well.

ES2011_product_studio

ES2011_product_profiler

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, October 10, 2011 7:52:51 AM (Eastern Standard Time, UTC-05:00)  #   
 Friday, September 16, 2011

This is a feature that has been in EntitySpaces for a while that has not been publicized much. By using the IConnectionNameService interface you get to manage what connection your EntitySpaces objects will use in a very powerful way. For instance, you could store the connection name you want each user to use in their session and use your implementation of IConnectionNameService to assign the connection name for that user’s data access. This is a great solution for multi-company databases.

Here’s an example:

My Implementation of IConnectionNameService.

using EntitySpaces.Interfaces;

namespace Sample
{
    public class MyConnectionNameHandler : IConnectionNameService
    {
        string IConnectionNameService.GetName()
        {
            return "SomeConnectionName"; // you could pull this from the ASP.NET session
        }
    }
}

Hooking it up

EntitySpaces.Interfaces.esConnection.ConnectionService = new Sample.MyConnectionNameHandler();

You only need to assign the ConnectionService once per your entire application. Once your connection name service is hooked up, EntitySpaces will always call your IConnectionNameService.GetName() method each time it accesses the database. So, you can use whatever logic you want to in the GetName() method. All you need to do is make sure the connection name that you return is in your web config file as a valid EntitySpaces connection. Please note that you do not return the connection string, you return the connection name.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, September 16, 2011 7:57:30 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, July 29, 2011

If you work for a software consulting company that operates in the Microsoft .NET marketplace then you know how competitive that market is right now. You might say that right now more than ever “Cash is King” and companies need to manage their cash flow more closely than they have in a long time. All of us here at EntitySpaces, LLC have spent a lot of time in the software consulting industry and would like to offer our thoughts on how the EntitySpaces Data Architecture and accompanying tools can truly help your company.

Let’s look at the capabilities your potential clients are looking for in a software consulting company.

  • Able to deliver on-time.
  • Able to deliver on or even under-budget.
  • Able to deliver an enterprise level, high quality product.
  • Able to maintain the product at a low cost.

If you could provide those capabilities listed above your reputation would help you win business, business would even seek you out. And even better, you would have plenty of repeat business from happy clients. Before we discuss how EntitySpaces, LLC can help you improve or develop these capabilities let’s list what should be your companies goal:

  • Provide all of the capabilities above with relative ease while at the same time operate at a high profitability level.

If you can provide these capabilities then your company is going to out-perform your competition and be successful. Let’s face it, a company needs to be smarter, faster, and better than the competition to survive. That’s where EntitySpaces can really help you.

How EntitySpaces Provides You With These Capabilities

  • By Not Reinventing Data Access Architectures You Save Time and Money, and Eliminate Risk

Almost all applications are written on top of a database, typically Microsoft SQL Server in the .NET marketplace. There is a lot of risk in creating a new data access architecture. Not only that, but your client doesn’t want to pay you to do this. If you are creating a new data-access architecture for each project you might be bidding against a company that isn’t, and therefore didn’t need to put in two months worth of development time in their bid to do so. This means you are submitting a much higher bid if you are.

How can EntitySpaces help in this area?

  1. EntitySpaces will reverse engineer or “generate” your data access layer (in C# or VB.NET) using your clients database as the definition in less than an hour.
  2. Your newly generated EntitySpaces data access layer code will compile clean and is well-tested right out of the box.
  3. When a client comes to you and states that they use Oracle, MySQL, PostgreSQL, Sybase, SQL Azure, SQLite, or even Microsoft Access you don’t have to turn their business down because you don’t have expertise in those database engines. With EntitySpaces in your shop you do have the expertise in-house. EntitySpaces works the same regardless of the database engine.
  • Keeping your Resource Utilization High

If you have three or four ongoing projects using EntitySpaces in your shop you can move developers freely from one project to another and they will be nearly immediately productive. Even if one project is using Microsoft SQL and the other one is using Oracle the transition will be smooth. Also, when one project ends you can move those resources onto an existing project and they will be an immediate benefit as opposed to causing a hit on the project as they try to learn an in-house, custom built data access architecture. Your software developers can even create common UI components to re-use among projects to become even more productive.

  • Maintaining Projects for Clients

If your company is creating a new architecture for each project then you know how hard it can be to maintain those projects when a client comes back and wants changes six months, or a year later. Typically, you need to find the original developer(s) and desperately hope they haven’t left the company. If you are lucky enough to have the original developer(s) they are probably busy on another project. It sure would be great if you could allocate any developer to a maintenance project knowing they could handle it even if they didn’t work on it originally.

  1. If the project uses the EntitySpaces architecture, and your developers are using it company wide, then anyone who is free or less critical on an existing project can handle the maintenance work.
  2. The database schema (or tables that hold the data) can be modified and then the EntitySpaces generator will re-generate the data-access architecture and the developer can make the necessary changes in the screens.
  • Improved Bidding Capabilities, Including Fixed Bid Contracts

By using EntitySpaces for all of your projects your project managers and software engineers will be able to provide you with much more accurate estimates. Imagine your team telling you that they can have the data-access architecture ready in a day. And since they are all familiar with how EntitySpaces works all of your developers are equally capable of working on the project. The confidence you have in your bidding process will be based on real, concrete evidence, and that confidence will carry through the entire project life cycle.

Let’s Talk Money

We are often amazed at the backward thinking of some consulting companies. Let me tell you a real-life story (Mike talking here).

I was working for one of the biggest software consulting firms in our city. We had won, or rather, picked up a very nice project. The client was one of the world's leading professional services organizations. Another consulting company had the project but screwed it all up so the client came to us. I went to our upper management with the hope to convince them to allow me to purchase a code generation tool (this was before I wrote MyGeneration and long before the creation of EntitySpaces). Anyway, when I explained how much time I would save on the project this was not well received by upper management. Getting done in less time meant less billable hours and on top of that I was asking them to actually spend money. Sounds crazy right? Well, it wasn’t. I had to create an architecture and I wasn’t about to do it by hand. It wasn’t easy to convince them that buying the tool and doing things that would normally takes weeks in mere hours was a good thing, but I pulled it off.

We bought the tool, and I went to town with it. The project manager from the client company flew up from Texas to manage the project, they had little-to-no specification for the product, but she knew the business inside and out. She was utterly amazed at my productivity. She would call me into her office and say “We need to change the database, this needs to be a many-to-many relationship, we need to add these fields to these tables, and rename this table” and so on. So, I would simply pull up SQL Server and I would make the changes right there with her. Then I would simply regenerate the data-access layer, adjust for the changes in the rest of the project, and by noon we’d but up and running again. She was astounded since the previous shop who failed on the project would react in horror at such changes and tell her it would take a week or two to implement the same changes. For me, it was no sweat. In fact, the project manager would say to me “You guys are so cheap” meaning that she couldn’t believe the reasonable price she was getting compared to our competition which previously failed to deliver.

We ended up winning a ton of repeat business from the client, even winning projects by bidding against their own internal IT department. Why? Because we were not only less expensive, but we were so much faster at software development. How much was that tool that I purchased? It was I think around $199.00, that’s it. Can you believe that? My company balked at spending such a small amount of money and ending up winning six digits worth of business and more because of it that lasted for years. Of course, that tool cannot compare to what EntitySpaces provides, but that was in the old days.

So, let’s get down to it.

The EntitySpaces Archecture has been around since 2006. It is very mature and well tested. The EntitySpaces Developer is licensed per developer seat. It’s $299 a seat. Each license comes with 2 roaming activations that can be used on the developers machine in the office and his machine and home, for instance. Each license can be activate and deactivated (transferred from machine to machine) at will without the need for our intervention.  You can download all minor and major versions for one year as well, and renewals are even cheaper. There are no royalties for the EntitySpaces runtimes, you can create and ship applications for a dozen clients. No licenses are needed for the client application of course.

Here’s how we look at it. $299 dollars is six hours worth of work at $50.00 an hour. If EntitySpaces saves your developer 6 hours worth of work you’ve already broke even. Considering that you can generate your data-access architecture in a single day instead of weeks, or more realistically months it pays for itself instantly. Of course we offer discount price breaks and Enterprise licensing. But EntitySpaces is so much more than just a generated data-access layer. EntitySpaces supports all of the databases mentioned above and we offer excellent and responsive support on our forums. We can also generate WCF Services and Silverlight RIA services for you out of the box. EntitySpaces provides you with a full hierarchical model based on the database, and comes with a powerful Dynamic Query API that looks like SQL itself (so a small learning curve). EntitySpaces also provides excellent and seamless transaction support, and can use stored procedures or dynamic SQL. EntitySpaces supports Silverlight, RIA Services, Windows Phone 7, the Compact Framework, Medium Trust Mode, and Mono. We also have excellent Serialization support, including JSON. We even provide a profiler that will record all of the SQL going back and forth between your application the database. EntitySpaces is very fast when it comes to performance as well.

Finally, you get to help drive our product feature set. In fact, we are about to put out our Fall 2011 wish-list thread on our forums to get customer input for the next release. EntitySpaces is very customer driven, always has been. Remember, when you post on our forums you are talking to the creators and have direct access to the EntitySpaces Team.

Let us help you make your business more profitable. Your developers will find working on projects with EntitySpaces to be more fun (because we remove the grunt-work) and you’ll have less turn over. Good developers will want to work for your company because you will essentially “have it together”.

You can grab our fully functional trial version HERE … and you don’t even have to register.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, July 29, 2011 10:01:08 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, July 04, 2011

EntitySpaces has kicked off an open source project named Punchout. The Punchout Controls are a set of user interface controls for the Knockout (MVVM) javascript library. We are already off to a decent start with our poGrid (where “po” stands for “Punchout”). The Punchout controls are licensed under the MIT license.

We have created a new repository on the github social coding platform to host The Punchout Controls. 

The Punchout Controls will come in two forms:

  1. Generic Punchout controls
  2. EntitySpaces Punchout controls

The EntitySpaces versions of the Punchout Controls will take the “Generic Punchout Controls” and build in support for the EntitySpaces architecture with all its row and dirty column state tracking capabilities, its built in paging capabilities, and so on. A lot of this work is already in-place and will come together quickly.

If you are interested in taking a look at the beginnings of our poGrid control go to the Punchout site ( https://github.com/EntitySpaces/Punchout ) and click on the “Download” button. All you need to do is drill into the examples folder (the “Non-EntitySpaces” folder) and click on the “SampleGrid.htm” file. No web server setup needed, it’s just a simple html file. View the source on the sample file.

We currently support client side paging, server side paging is next, then sorting, and then styling support. We will also be adding many more controls and enlisting other like-minded folks to help us. Using github will allow us to collaborate with you on this project. We have a large customer as well who will be contributing to Punchout and using The Punchout Controls for development. And, since these are licensed under the MIT license you are free to use them at well.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, July 04, 2011 10:39:15 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, June 30, 2011

We are still loving the combination of EntitySpaces and Knockout. We’ve created a Master / Detail page that demonstrates fetching a collection of employee records using EntitySpaces in a WCF service. We only return the first 10 employees in the database in our Master / Detail page. We have created a little “grid” control using templating to create a simple HTML table that acts as our grid. We also show you how to edit the data in the grid and allow you to click the “Commit” button to save it back to the database.

In Part III we will do some more advanced stuff, like adding data, deleting data, and paging through data using the EntitySpaces objects in our WCF Service. The esKnockout.js file is coming along very nicely and provides anyone wishing to use EntitySpaces and Knockout together with some great functionality. We will eventually turn our little grid introduced in Part II into a pretty decent reusable control. However, our goal right now is to keep it simple and not overwhelm you.

It’s late tonight, and we’re tired, we are going to post a follow up post that will explain in detail what the Master / Detail code is doing. However, in the meantime, go ahead and play with our new Master Detail page. Notice how the binding all just works and when it comes time to “Commit” the data we just ask the “es” knockout helper for the dirty rows, convert them to a json string, display the json to you in an alert() box, and finally hit our “EmployeesCollection_Save” method on our WCF service to save the data.

We probably shouldn’t have our view model actually hitting the service directly, but there are many options here. So, take a moment to play with Part II and watch for our detailed code-breakdown post that will explain how it all works in detail. To see the source for the page just use your browsers “View Source” feature. We couldn’t find a formatter that could handle all the content correctly. If at first it looks like a lot of code it really isn’t once you browse through it and get a feel for it. Also, if the grid looks funny in IE9, switch to compatibility mode.

Part II – Master Detail

http://www.entityspaces.net/portal/Products/Features/EntitySpacesKnockout.aspx

Part I – Editing a single record

http://www.entityspaces.net/Knockout/Part1/Sample/Editing.htm

Before you get too bent out of shape on Part II stick around for Part III, all the moving pieces are going to come together nicely, but we are moving in chunks so you can stay with us. Your feedback is always welcome.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, June 29, 2011 11:22:33 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, May 30, 2011

This is a small maintenance release. We addressed several issues in this release which are covered below:

  1. We fixed the annoying Licensing Activation issue that a few customers were running into.
  2. We fixed a small bug having to do with the ApplyDefaults() method (found by our internal testing).
  3. We made sure that if you added a new entity to a collection and then marked it as deleted that it was simply removed from the collection.
  4. We added the ability to see the foreign table name and the primary table name on foreign keys in the Metadata tab.

We are now looking toward our next major release and will hope to stand on this release until then.

Everything is now on the 2011.1.0530.0 release, Developer, Profiler, Source and the Trial version …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, May 30, 2011 9:11:41 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, May 16, 2011

There were two issues found in our initial ES2011 Release (version 2011.1.0509.3) that warranted putting out a new release:

  1. We found via our own testing a bug in the new Auditing fields functionality. When saving a collection the “ModifiedBy” column was being filled-in even on unchanged entities, causing a needless save. This was fixed. Unless you were using this feature with the client-side event handler technique you would not encounter this problem.
  2. In ES2011 we improved the way we handle many-to-many relationships, including allowing them to function cross-schema. However, there was a minor bug in the code generation with columns named a certain way. This would cause a code generation error in the generated code. This was fixed.

Finally, while we were in the many-to-many area we made sure they could handle many-to-many relationships build with composite keys.

While this update is optional you might want to go ahead update to it even if you aren’t encountering the two issues above. If you do upgrade we do recommend you regenerate your code.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, May 16, 2011 6:37:46 AM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, March 30, 2011

We are getting close now to our final beta. Almost all of the providers now support all of the new auditing fields. In fact, our providers now have higher pass counts in our NUnit test suite than ever before. We fixed a bug in PruneGraph() in this beta, it’s dead on now.  Also, we renamed ExtraColumns to esExtraColumns for WCF Serialization. However, it won’t break your serialization because it still travels over the wire as ExtraColumns. We need to do this as we have a customer with a column named ExtraColumns. We always prefix our stuff with “es” and didn’t on this one, live and learn.  You might have to rename the field in any of your XAML however if your using extra columns.

We will be announcing the official release dates for our final beta and the official release of EntitySpaces 2011 soon. Of course, EntitySpaces 2010 is shipping now.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, March 30, 2011 9:17:58 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, March 20, 2011

The latest EntitySpaces Profiler and Developer “Beta” editions are now available for download. The only provider we have fully tested however is SqlClient, the rest of the providers do work reasonably well though.

Here is what is new:

  1. Project File Improvements – See this blog post …
  2. Powerful New Hierarchical Features – See this blog post …

    • PruneGraph() – This method will remove all entities from the object graph that are not dirty.
    • IsDirtyGraph – This property returns true as soon as one object is found in the object graph that is dirty.
    • AcceptChangesGraph() – This method does the same thing as AcceptChanges() except that it operates on the entire object graph.
    • RejectChangesGraph() – This method does the same thing as RejectChanges() except that it operates on the entire object graph.
    • esVisitor class Allows you to walk the hierarhical object graph.

  3. A new WCF Service “Non Proxy Based” template. This uses the new DataContract serialization built into the core entities and collections.
  4. Single Entity classes can now override - virtual protected void ApplyDefaults() if you want to assign default values on newly created entities.

Also, all samples were regenerated and validated. All sample solutions are provided as VS2008 solutions unless VS2010 is required as is the case with RIA Services, Windows Phone, and so on.

At this point all we need to do is make a pass through the providers and complete the implementation of the special columns as outlined in this post, then we can release to production. We are hoping this will be around April 18th, less than a month away.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, March 20, 2011 3:20:39 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, February 27, 2011

We are pleased to make our first EntitySpaces 2011 Beta available to current customers. You can install ES2011 side-by-side with ES2010 just fine. The ES2011 production (or a future beta) release will convert your ES2010 settings and project files over to our new format. However, this first beta does not. You will to re-enter your database connection information after installation. Your ES2010 project files will not work with this beta. The beta is also a trial version as well, do not “go-live” with it. We’ll have a go-live soon enough for you.

Some highlights included in this beta are:

Windows Phone 7 Support

Windows Phone

Windows Phone 7 is now fully supported. A new sample application is included as well. Our Windows Phone 7 sample uses a traditional (non RIA) WCF service (generated by EntitySpaces of course) to access data from the Microsoft SQL Northwind database and displays it on the screen. We use our EntitySpaces DynamicQuery API in the Windows Phone 7 application by referencing the new EntitySpaces.DynamicQuery.WP7.dll in our application.

The EntitySpaces Profiler

The Profiler is a new product offering from EntitySpaces. It is a separate application that will be available for $199.00 and has a separate installer as well. Current customers can download the Profiler along with this beta. The Profiler will not profile your ES2010 applications. The Profiler “phones home” so you will need to have internet connectivity in order to use it. Profiling works on all of our data providers and has proven to be very useful, even in our own development of EntitySpaces. The Windows Forms samples (C# and VB.NET) have “Begin Profiling” and “End Profiling” buttons that you can use to enable profiling. Just launch the Profiler and play with the demo’s and you will quickly see how the Profiling works. See these blog posts (and very useful videos) for more information on the Profiler ==> CLICK HERE

The Special Auditing Fields 

This has only been implemented for Microsoft SQL so far. We will be adding this to all of our providers before the next beta release.

The auditing fields supported are as follows (you control the actual name of the column):

  1. DateAdded
  2. DateModified
  3. AddedBy
  4. ModifiedBy
  5. Concurrency (the EntitySpaces Universal Concurrency Column works the same on all databases)

See this blog post for more information on the new Auditing Fields ==> CLICK HERE

RIA Services Improvements

We have made some very nice improvements in the DomainService that makes saving your data more seamless. Also, the Metadata classes no longer mark fields as required (using the [Required] attribute) if they have a default value in the database.

ADO.NET Provider Upgrades

  1. VistaDB 4 – We are now bound to the 4.1.0.0 Provider. We are also in contact with Gibraltar to ensure that we upgrade to their new release of VistaDB when available.
  2. EffiProz – We are now bound to the 1.5.4002.18367 Provider.

We have also fixed several issues that we’re reported on the EntitySpaces forums. We have some other goodies and surprises that will be announced in our next beta release.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, February 27, 2011 9:18:56 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, February 21, 2011

EntitySpaces 2011 has some very cool new features. One of these features is sophisticated support for auditing “type” fields. In fact, EntitySpaces 2011 supports for five special fields (you control the actual column names). If you follow along with this post we think you will be impressed with this new feature and it’s flexibility. The five special fields are:

  1. DateAdded
  2. DateModified
  3. AddedBy
  4. ModifiedBy
  5. Concurrency (the EntitySpaces Universal Concurrency Column)

These fields can be filled in automatically for you as will be demonstrated in this post.

The DateAdded field is filled in only during an INSERT. The DateModified column is filled in during both an INSERT and an UPDATE. If you only have one date field that you use to track the changes then you would use the DateModified field and skip the DateAdded field. The date can be handled on the server side via a database “date” function of your choosing or it can take place on the client side using DateTime.Now or DateTime.Utc. For this blog post we have set the DateAdded column to use the SQL function getdate() on the server side and the DateModified fields is set to use the DateTime.Now property on the client side. You never have to remember to fill in these fields in, EntitySpaces will do it for you.

audit_fields1

The Screen below shows how you can handle your AddedBy and ModifiedBy fields. These would be user ID’s, possibly Guid’s or perhaps a string identifying the user. Again, you can indicate whether you want to use a SQL function to fill this field in on the server side or you can use an event handler in code. As with the Date’s above, if you only have one field and not two user fields, then use ModifiedBy as it is updated during INSERT’s and UPDATE’s.

audit_fields2

This code below is from our test application. Notice that we set static event handlers (AddedByEventHandler and ModifiedByEventHandler) on the esEntity class. We really only need the ModifiedByEventHandler since we have chosen to use the SQL function dbo.GetCurrentUser() for AddedBy but we did this for completeness. This event handler mechanism is very handy, if you are working on an ASP.NET application all you would need to do is pull the UserId from the session in the handler and all of your AddedBy and ModifiedBy fields would be handled for you automatically. EntitySpaces will call your handlers at the appropriate time during the Save() method.

audit_fields6

Finally, if you take advantage of the Universal EntitySpaces concurrency mechanism you no longer have to set this in the user metadata on each individual field, all you have to do in EntitySpaces 2011 is supply the column name once in this tab.  Notice we indicated that our column is named “esVersion”.

audit_fields3

Let’s take a look at how this works. We have an Employees table that has all 5 of the special column shown below, along with a FirstName and LastName column. Our Employees column also has an “Age” column that defaults to 35 if not filled in and an Id field which is an autoincrement column. We generated the code with the settings above and then executed the code shown below:

audit_fields7

We ran our new EntitySpaces Profiler and captured the information shown below. Notice that AddedBy was set to our dbo.GetCurrentUser() and that the DateAdded() field was set to GetDate(). We also fetch our autoincrement column which is the primary key of the table. Finally, we return the “Age” field since it has a default and was not filled before calling Save().  Our dbo.GetCurrentUser() merely returns “wow, it works”.

audit_fields4

Take a look at the parameter directions for each parameter and the Before and After parameter values. This ensures that all of the column values are brought back and sitting in your Employees object ready for use after the call to save.

audit_fields5

So, even though we only filled in two fields before saving our Employees object (the FirstName and LastName columns) all nine of our Employee fields were present and accounted for after the call to Save, just sitting there in our entity waiting to be used. All we had to do is check a few options before we generated our EntitySpaces objects. Our Id, Age, DateAdded, DateModifed, AddedBy, ModifiedBy, and esVersion fields were all handled automatically by EntitySpaces. Pretty cool stuff, more to come …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, February 21, 2011 11:35:07 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, February 19, 2011

Here are a few recent tweaks. We now have the SQL formatter in place (though we need to adjust the colors) and we capture the SQL parameters before and after the call which is very useful. The image below is from an INSERT that is using our new auditing fields such as DateAdded, DateModified, AddedBy, and ModifiedBy. The SQL shown below is also using our universal concurrency column esVersion (can be named whatever you want), and an Identity column (auto increment). Finally, the “Age” column was null during the insert but since it has a default value of 35 we bring it back as well.

SQL Formatter

Profiler1

SQL Parameters (Before and After the Operation)

Profiler2

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, February 19, 2011 10:32:27 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, February 17, 2011

February 28th is the target date for our EntitySpaces 2011 Beta. The beta will be available to customers only. The EntitySpaces Profiler is really shaping up nicely and already, in our own development, we are finding it to be an invaluable tool. The EntitySpaces Profiler will be sold separately for $199.00 and all customers will get a chance to test drive it during the ES2011 Beta. We are working hard on the profiler so it will only continue to improve before the release date. The UI has vastly improved over the initial look in our previous video, so take a moment and check it out.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, February 17, 2011 11:47:54 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, February 13, 2011

Here is a sneak peek at our new EntitySpaces Profiler. Our Profiler will allow you to monitor all SQL traffic for all of our supported databases and will work regardless of the type of application you are developing. It doesn’t matter if it’s a Windows Forms application, a web application, a Windows Phone 7 application, a RIA Services app, it just doesn’t matter. This will work for all of the databases listed on our home page.

Check out this sneak peek

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, February 13, 2011 11:28:44 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, February 05, 2011

Settings Enhancements

specialcolumns We thought we would begin to show you some of the changes we are working on for ES2011. The first change is support for DateAdded and DateModified type columns. Notice the new tab named “Custom Fields” on the “Settings” tab. On this tab you can enable automatic updating of your DateAdded and DateModified columns. Of course, the column name for each can be set to whatever you happen to call these columns in your particular database. You can also choose whether or not you want the date to come from the client or the server.

For the server you provide the SQL you want EntitySpaces to use during the insert/update, for example, we have provided “getdate()” in this example for SQL server, however, you can choose whatever you want to for your particular needs and database engine. If you choose to have the date provided by the client you indicate whether you want EntitySpaces to use DateTime.Now or DateTime.UtcNow. Both the DateAdded and DateModified are set on a SQL INSERT, only DateModified is set on a SQL UPDATE.

Also, notice at the bottom there is a “Concurrency Column” textbox. Now you can type in the name of your “EntitySpaces Universal Concurrency” column one and not have to apply this to each individual column via the Metadata tab. At the top of the tab you can see there is a Driver tab, all of the settings on this tab can be set per provider. You will probably use different Server Side SQL for each database, therefore these settings can be set “per driver”. Also, on the Connection tab your database connections are now stored per driver. This way, when you toggle from SQL to Oracle your Oracle connection is there for you, no need to copy and paste it in.

Finally, not shown here is a new textbox on the “Naming Conventions” tab for the “Namespace”. By default we use “BusinessObjects” but we know many of you change this, so the default will now be in the Settings and you can type in your namespace, save your settings, and never have to worry about setting this again.

esUtility Enhancements

We have always supported ExecuteScalar() but we also added the generic ExecuteScalar<T>() method. These were always available on the Collection and Entity classes and now the generic ExecuteScalar<T>() method is available on esUtility as well. We also made sure that it never returns DBNull.Value but null or Nothing in VB.

Also, we enhanced the connection abilities. Finally, you can do this with esUtility …

esUtility util = new esUtil();
util.es.Connection.Name = “SomeName”;

In the past you only could do this

esUtility util = new esUtil();
util.ConnectionName = “SomeName”;

You now have full access to the Connection on the esUtility class.

Of course, we have much more to show you and you’re going to see a series of Sneakpeek blog posts coming out in quick succession. We will announce a release date soon.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, February 05, 2011 7:16:25 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, January 22, 2011
We would like share with you a great way to use the MVVM approach with EntitySpaces and RIA Services. The screen shot below is our C# RIA Service sample with a new page called “MVVM Example”. This new page allows you to page through data, edit that data, save or cancel your changes, and finally clear or reload the data. The really cool thing is that it takes very little code to do this. There is a link at the bottom of this page to download the sample free of charge. The sample does use the Silverlight Toolkit from CodePlex which is available here http://silverlight.codeplex.com/releases/view/43528. However, you don’t really have to use it, just remove the BusyIndicator from the MvvmExample.Xaml page and you won’t need it.

MVVM

Let’s take a look at the files that were added to the sample project first to give you an idea of what we did.

MVVM1

First, notice the MVVM folder. This folder contains three files and they are the core classes for using EntitySpaces in a MVVM application along with RIA Services.

1) BaseViewModel – This is a base class for you ViewModel classes.
2) DelegateCommand – This is used for commanding, ie, handling button events and so forth.
3) GenericEntityController – This is a .NET Generic class that can load your data and automatically scroll through that data for you

Next notice the ViewModel folder. This contains our ViewModel for our MVVM example (MvvmExampleViewModel.cs) which inherits from the BaseViewModel class mentioned above.

Finally, the MvvmExample.xaml class which contains the UI for the screen shown above in the first image.

So, let’s take a look at the MvvmExample.xaml class. Let’s start with the code behind class.

   1:  using System.Windows.Controls;
   2:  using System.Windows.Navigation;
   3:   
   4:  using Silverlight_RiaServices.ViewModels;
   5:  using Silverlight_RiaServices.Web;
   6:   
   7:  namespace Silverlight_RiaServices.Views
   8:  {
   9:      public partial class MvvmExample : Page
  10:      {
  11:          private MvvmExampleViewModel model = null;
  12:   
  13:          public MvvmExample()
  14:          {
  15:              InitializeComponent();
  16:          }
  17:   
  18:          // Executes when the user navigates to this page.
  19:          protected override void OnNavigatedTo(NavigationEventArgs e)
  20:          {
  21:              model = new MvvmExampleViewModel(new esDomainContext());
  22:              this.DataContext = model;
  23:          }
  24:      }
  25:  }

Basically, all we do in the code behind is instantiate our MvvmExampleViewModel class passing it a new instance of our esDomainContext and then set it as the page’s DataContext. Notice that there is no other logic in the page, the logic is contained in the MvvmExampleViewModel.cs class.

At this point we if we were following a strict chronological order we would look at the XAML page, however, it will make more sense if we look at our ViewModel class next. Let’s look at the core of the ViewModel class and then we’ll look at it in it’s entirety later.

   1:  employeesCollectionController = new EntityController<Employees>(Context, Context.Employees);
   2:  employeesCollectionController.PropertyChanged += new PropertyChangedEventHandler(EmployeesController_PropertyChanged);
   3:   
   4:  employeesCollectionController.Pager.PageSize = base.DefaultPageSize;
   5:  employeesCollectionController.Pager.PagingCountCallback = EmployeesCountCallback; // <==
   6:  employeesCollectionController.Pager.PagingQueryCallback = EmployeesQueryCallback; // <==
   7:   
   8:  employeesCollectionController.Pager.CurrentPage = 1;
   9:   
  10:  private InvokeOperation<int> EmployeesCountCallback()
  11:  {
  12:      EmployeesQueryProxyStub q = new EmployeesQueryProxyStub();
  13:      // q.Where( yada yada );
  14:   
  15:      q.es.CountAll = true;
  16:   
  17:      return Context.Employees_GetCount(q, employeesCollectionController.Pager.GetPageCountCompleted, null);
  18:  }
  19:   
  20:  private EntityQuery<Employees> EmployeesQueryCallback()
  21:  {
  22:      EmployeesQueryProxyStub q = new EmployeesQueryProxyStub();
  23:      q.Select(q.EmployeeID, q.FirstName, q.LastName);
  24:      // q.Where( yada yada );
  25:   
  26:      q.OrderBy(q.EmployeeID.Ascending);
  27:   
  28:      q.es.PageNumber = employeesCollectionController.Pager.CurrentPage;
  29:      q.es.PageSize = employeesCollectionController.Pager.PageSize;
  30:   
  31:      return Context.Employees_LoadByDynamicQuery(q);
  32:  }

On line 1 we use the Generic EntityController<> to create our employeesCollectionController.
On line 4 we set the Controllers default page size to “5” (you can change in this if you like).
On line 5 we provide the controller with a method to call when it needs to get the count of Empoyees.
On line 6 we provide the controller with a method to call when it needs to get a page of data.
On line 8 we set the Controller.Pager.CurrentPage to 1 which force it to load the first page of data.

You can see the two methods EmployeesCountCallback and EmployeesQueryCallback. You can make these methods very sophisticated with joins, filtering on user entered criteria and so on. Just remember that your where clause should be the same in both methods so your count and the objects you are scrolling through match.

That’s basically all it takes to run the page above, paging happens automatically. Now let’s look at the XAML.

   1:  <navigation:Page x:Class="Silverlight_RiaServices.Views.MvvmExample"
   2:             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   4:             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   5:             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   6:             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"      
   7:             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"      
   8:             mc:Ignorable="d"
   9:             xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  10:             d:DesignWidth="640" d:DesignHeight="480"
  11:             Title="MVVM Example Page">
  12:      <toolkit:BusyIndicator IsBusy="{Binding EmployeesCollectionController.IsLoading}">
  13:          <Grid x:Name="LayoutRoot">
  14:              <Grid.RowDefinitions>
  15:                  <RowDefinition Height="50*" />
  16:                  <RowDefinition Height="28" />
  17:                  <RowDefinition Height="125" />
  18:              </Grid.RowDefinitions>
  19:              <!-- Data Grid -->
  20:              <sdk:DataGrid Grid.Row="0" SelectionMode="Single" AutoGenerateColumns="False"
  21:                      Name="dgEmployees"
  22:                      ItemsSource="{Binding EmployeesCollectionController.EntityCollection}" 
  23:                      SelectedItem="{Binding EmployeesCollectionController.CurrentEntity, Mode=TwoWay}"
  24:                      IsReadOnly="False">
  25:                  <sdk:DataGrid.Columns>
  26:                      <sdk:DataGridTextColumn Header="Employee ID" Binding="{Binding EmployeeID}" IsReadOnly="True"/>
  27:                      <sdk:DataGridTextColumn Header="First Name" Binding="{Binding FirstName}" />
  28:                      <sdk:DataGridTextColumn Header="Last Name" Binding="{Binding LastName}" />
  29:                  </sdk:DataGrid.Columns>
  30:              </sdk:DataGrid>
  31:              <Grid Grid.Row="1">
  32:                  <Grid.ColumnDefinitions>
  33:                      <ColumnDefinition Width="*" />
  34:                      <ColumnDefinition Width="Auto" />
  35:                  </Grid.ColumnDefinitions>
  36:                  <!-- Paging Control -->
  37:                  <StackPanel DataContext="{Binding EmployeesCollectionController.Pager}" Orientation="Horizontal" >
  38:                      <Button Content="Prev" Command="{Binding PagePrevCommand}" Width="60" Margin="2"/>
  39:                      <TextBox Text="{Binding CurrentPage, Mode=TwoWay}"  />
  40:                      <TextBlock Text=" of " VerticalAlignment="Center" />
  41:                      <TextBlock Text="{Binding MaxPages, Mode=TwoWay}" VerticalAlignment="Center"/>
  42:                      <Button Content="Next" Command="{Binding PageNextCommand}" Width="60" Margin="2"/>
  43:                  </StackPanel>
  44:              </Grid>
  45:              <!-- Buttons with commands -->
  46:              <StackPanel Grid.Row="2" HorizontalAlignment="Right" >
  47:                  <Button Content="Save" Width="80" Command="{Binding SaveCommand}" />
  48:                  <Button Content="Cancel" Width="80" Command="{Binding CancelCommand}" />
  49:                  <Button Content="Clear" Width="80" Command="{Binding ClearCommand}" />
  50:                  <Button Content="Reload" Width="80" Command="{Binding ReloadCommand}" />
  51:              </StackPanel>
  52:   
  53:          </Grid>
  54:      </toolkit:BusyIndicator>
  55:  </navigation:Page>

Notice lines 22 and 23. We bind to our controllers EmployeeCollectionController.EntityCollection and EmployeeCollectionController.CurrentEntity, this works great.
Next notice line 37, this stack panel is our paging control. Notice that we bind to EmployeeCollectionController.Pager and the buttons are bound to PagePrevCommand and PageNextCommand which are provided by the BaseModelView class along with the rest of the binding information. In other words, paging is a no brainer, you don’t even have to worry about it, it just happens.
Finally, notice the stack panel at line 46. This stack panel contains our buttons. The SaveCommand and CancelCommand are provided by the BaseViewModel.cs also, they are enabled and disabled automatically as changes are made. We implemented the ClearCommand and ReloadCommand “Commands” to show you how you can work with the controller.

Okay, now we can show you the entire MvvmExampleViewModel.cs class. Of course, this is all provided in the download as well which is provided at the end of this article.

   1:  using System.ComponentModel;
   2:  using System.ServiceModel.DomainServices.Client;
   3:   
   4:  using MVVM;
   5:   
   6:  using Silverlight_RiaServices.Web;
   7:  using BusinessObjects;
   8:   
   9:  namespace Silverlight_RiaServices.ViewModels
  10:  {
  11:      public class MvvmExampleViewModel : BaseViewModel<esDomainContext>, INotifyPropertyChanged
  12:      {
  13:          public MvvmExampleViewModel(DomainContext context)
  14:              : base(context as esDomainContext)
  15:          {
  16:              ReloadCommand = new DelegateCommand(Reload, canReload);
  17:              ClearCommand = new DelegateCommand(Clear, canClear);
  18:   
  19:              employeesCollectionController = new EntityController<Employees>(Context, Context.Employees);
  20:              employeesCollectionController.PropertyChanged += new PropertyChangedEventHandler(EmployeesController_PropertyChanged);
  21:   
  22:              employeesCollectionController.Pager.PageSize = base.DefaultPageSize;
  23:              employeesCollectionController.Pager.PagingCountCallback = EmployeesCountCallback;
  24:              employeesCollectionController.Pager.PagingQueryCallback = EmployeesQueryCallback;
  25:   
  26:              employeesCollectionController.Pager.CurrentPage = 1;
  27:          }
  28:   
  29:          private EntityController<Employees> employeesCollectionController;
  30:          public EntityController<Employees> EmployeesCollectionController
  31:          {
  32:              get { return employeesCollectionController; }
  33:          }
  34:   
  35:          private InvokeOperation<int> EmployeesCountCallback()
  36:          {
  37:              EmployeesQueryProxyStub q = new EmployeesQueryProxyStub();
  38:              // q.Where( yada yada );
  39:   
  40:              q.es.CountAll = true;
  41:   
  42:              return Context.Employees_GetCount(q, employeesCollectionController.Pager.GetPageCountCompleted, null);
  43:          }
  44:   
  45:          private EntityQuery<Employees> EmployeesQueryCallback()
  46:          {
  47:              EmployeesQueryProxyStub q = new EmployeesQueryProxyStub();
  48:              q.Select(q.EmployeeID, q.FirstName, q.LastName);
  49:              // q.Where( yada yada );
  50:   
  51:              q.OrderBy(q.EmployeeID.Ascending);
  52:   
  53:              q.es.PageNumber = employeesCollectionController.Pager.CurrentPage;
  54:              q.es.PageSize = employeesCollectionController.Pager.PageSize;
  55:   
  56:              return Context.Employees_LoadByDynamicQuery(q);
  57:          }
  58:   
  59:          void EmployeesController_PropertyChanged(object sender, PropertyChangedEventArgs e)
  60:          {
  61:              if (e.PropertyName == "CurrentEntity")
  62:              {
  63:                  SaveCommand.RaiseCanExecuteChanged();
  64:                  CancelCommand.RaiseCanExecuteChanged();
  65:              }
  66:          }
  67:   
  68:          protected override void SaveCmd(object parameter)
  69:          {
  70:              base.Save(PostSave);
  71:          }
  72:   
  73:          public void PostSave(SubmitOperation submitOperation, object state)
  74:          {
  75:              UpdateButtonStates();
  76:          }
  77:   
  78:          protected void UpdateButtonStates()
  79:          {
  80:              SaveCommand.RaiseCanExecuteChanged();
  81:              CancelCommand.RaiseCanExecuteChanged();
  82:              ReloadCommand.RaiseCanExecuteChanged();
  83:              ClearCommand.RaiseCanExecuteChanged();
  84:          }
  85:   
  86:          #region Commands
  87:   
  88:          public DelegateCommand ReloadCommand { get; set; }
  89:   
  90:          private void Reload(object parameter)
  91:          {
  92:              Context.Employees.Clear();
  93:   
  94:              // Setting the Controllers CurrentPage to 1 reloads
  95:              EmployeesCollectionController.Pager.CurrentPage = 1;
  96:          }
  97:          private bool canReload(object parameter)
  98:          {
  99:              return true;
 100:          }
 101:   
 102:          public DelegateCommand ClearCommand { get; set; }
 103:   
 104:          private void Clear(object parameter)
 105:          {
 106:              Context.Employees.Clear();
 107:   
 108:              // Setting the Controllers CurrentPage to -1 clears the data
 109:              EmployeesCollectionController.Pager.CurrentPage = -1;
 110:          }
 111:          private bool canClear(object parameter)
 112:          {
 113:              return true;
 114:          }
 115:   
 116:          #endregion
 117:      }
 118:  }
 

While this might look like a lot of code it really isn’t. We created this page in about 10 minutes, and it can scroll, edit, and save data. You are free to use the MVVM base classes in your applications, feel free to modify them as needed, they are pretty well tested at this point. We have created very complex pages with 4 or 5 grids of data using a separate controller for each, it works quite well. If you are writing a RIA Services application with EntitySpaces these classes are a must have. However, if you are not in the need of paging support, it is cleaner to just go directly to the esDomainContext to load your data and skip the Controller. The Controller is great for paging but overkill when paging is not needed.

To download click ==> HERE. Just unzip this into your Samples folder and that way all of the references “will just work”. Say “Yes”, to overwrite any of your existing files as your only writing over our previous C# RIA Service sample. This code is provided as-is and is not part of the EntitySpaces core code.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, January 22, 2011 12:30:23 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, January 15, 2011

EntitySpaces 2011 will fully support Windows Phone 7. In fact, for those who are interested in starting now using EntitySpaces 2010 (you must be an existing customer) please send an email to mike.griffin@entityspaces.net and we’ll provide you with instructions for downloading the starter kit (and this demo). This demo was created in about 15 minutes. We generated everything we needed to create the demo, including the WCF Service itself, using EntitySpaces 2010.

WP71

This sample was very simple to create. It’s much the same as writing a Silverlight application using EntitySpaces. While we could have used RIA Services for our WCF Service we chose to use a traditional WCF Service. We think this offers the most power and control. So let’s take a look at how this was created.

Our solution contains three projects, our client side proxies, the WcfService, and the WindowsPhone project itself.

WP72

Let’s take a look at each of the three projects one by one.

1) EntitySpaces.Proxies – This is a sample “Windows Phone Class Library”

WP73

First, notice the new assembly named “EntitySpaces.DynamicQuery.WP7.dll”. This assemblies is our DynamicQuery API compiled as a “Windows Phone Class Library” and it will allow you to use our DynamicQuery API within your Windows Phone Application. The ProxyStub classes were generated via our “Client Side Proxy Stub” template using the options below:

WP74

2) WcfService – This is a sample “WCF Service Application”

WP75

This is all server side code, notice we include the proper EntitySpaces assemblies in our references. We also use this project to house our Custom and Generated EntitySpaces classes. For our Generated classes we added full Proxy support via the Proxy tab. Also, we used our “WCF Service” template to generate our WCF Service which we called “Northwind”. Finally, we added a Global.asax so that we could do the one-time registration of the loader and then we added our EntitySpaces configuration settings to the Web.config file. That’s it, your full server side entities and your WCF Service in about 5 minutes.

3) WindowsPhone – This is a sample “Windows Phone Databound Application”

WP76

Notice that we include our “EntitySpaces.Proxie”s assembly and the “EntitySpaces.DynamicQuery.WP7” assembly in our references. Also, we added a Service Reference to our generated “Northwind” WCF Service. Finally, we created our very simple esDemo.xaml file which we will look at later. There is one trick you want to be sure to use when adding your Service Reference. That is, make sure you tell Visual Studio that you want to use the EntitySpaces proxies contained in your EntitySpaces.Proxies assembly and not allow Visual Studio to generate it’s proxies (which aren’t as smart as the EntitySpaces proxies).

This is done as follows (in the “Advanced” tab) when adding your Service Reference.

WP77

Finally, let’s look at the XAML and code. Notice we didn’t use a MVVM model, we wanted to keep this down to just the EntitySpaces mechanics. We use a Listbox with a DataTemplate, nothing fancy.

WP78

In the Code Behind we use our DynamicQuery API to create a query and then send it to our WCF Service.

WP79

That’s it, it’s pretty simple really. The demo runs against the Microsoft SQL Northwind database (which is shipped with EntitySpaces). If you want to get started on your Windows Phone 7 application now using EntitySpaces 2010 send an email to mike.griffin@entityspaces.net and we’ll get you setup.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, January 15, 2011 7:41:12 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, November 21, 2010

This is a minor maintenance release and it will be our final ES2010 Release. We are branching the source and beginning our work on ES2011. The Trial Version has also been updated.
Here are the issues that were fixed:

  • There was a bug which could occur during a first time installation of EntitySpaces that would result in an invalid esSettings.xml file being created. This has been fixed.
  • There was an issue which would result in a null being returned for KnownTypes when the EntitySpaces business objects were contained in a separate assembly. This has been fixed in both our WCF and RIA Service templates (this issue was reported on the forums).
  • We now use the full namespace in the generated “Prefetch” logic to avoid any possible compiler errors (this issue was reported on the forums).
  • The RIA Service esDomainService class now calls a method to allow you to handle an exception during PersistChangeSet(). The method should be in the esDomainService.Custom.cs class upon generation.  However, since this file is not overwritten during code generation you might have to manually add this to your existing custom class. The method is as follows:

    /// <summary>
    /// Give you a chance to handle any error during PersistChangeSet()
    /// </summary>
    /// <param name="ex">The Exception</param>
    /// <returns>True if handle, otherwise the Exception is rethrown and bubbled up</returns>
    private bool HandleError(Exception ex)
    {
        return false;
    }
  • We now have support for EffiProz. The EntitySpaces provider is included in this release. However, it has not gone through our NUnit test suite. We are working with the EffiProz folks to get our test databases converted over to EffiProz so that we can run those tests. We did do some testing however, we can save, insert, delete, query and so on ..
  • We implemented the DynamicQuery Skip() and Take() methods for SQL Server 2011 (Denali) which is the first version of SQL that supports this type of API. For more information on this see http://msdn.microsoft.com/en-us/library/ms188385(v=SQL.110).aspx
  • We pushed a lot of functionality from the esEntityCollection<T> class to the non-generic esEntityCollectionBase class.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, November 21, 2010 10:04:38 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, October 24, 2010

There are some major new features in EntitySpaces 2010.1.1025.0 and you should regenerate you classes when you upgrade. Our Trial Version has also been updated to our new production release. Our samples are now better organized, the Northwind database is included so you can attach and run the demo’s. There is also a new PDF in each sample application’s solution showing you the exact choices we made in the templates when generating the sample.

New Features in this Release:

Silverilght – Extensive RIA Services Support

This release provides four new templates for developing RIA Services Applications. EntitySpaces can create everything you need to get started on your RIA Services application. EntitySpaces will create your DomainService class (including a partial class to go along with it to house your custom methods). Also, your Validation classes and your “Shared” classes for your entities are created as well. Finally a new RIA DynamicQuery template will create your EntitySpaces DynamicQuery classes which can be used under Silverlight in your RIA Services application. Also, two very nice samples are provided for RIA Services, one for C# developers and one for VB.NET developers.

Silveright/WCF Improvements

The WCF Template now generates partial classes for your WCF Service class and interface allowing you to amend the functionality without worrying about tweaking generated code,

Silverlight – Improved DataBinding Syntax for Extra Columns brought back via Joins

For example, the “SupplierName” in the sample below was brought back via a join.

<sdk:DataGridTextColumn x:Name="SupplierName" Binding="{Binding ExtraColumns[SupplierName], Mode=TwoWay}" Header="** Supplier Name **" />

KnownTypes Improvement

Both our RIA Services and WCF Services now automatically determine the “KnownTypes” for queries (as is the case when using joins) making your query methods totally generic, for example:

public TerritoriesCollectionProxyStub Territories_QueryForCollection(string serializedQuery)
{
    List types = this.GetSubQueryTypes(serializedQuery, "BusinessObjects");

    TerritoriesQuery query = TerritoriesQuery.SerializeHelper.FromXml(
        serializedQuery, typeof(TerritoriesQuery), types) as TerritoriesQuery;

    TerritoriesCollection coll = new TerritoriesCollection();
    if (coll.Load(query))
    {
	return coll;
    }

    return null;
}

DynamicQuery API – “Union”, “Union All”, “Intersect”, “Except” Support

For example:

EmployeeQuery eq1 = new EmployeeQuery("eq1");
EmployeeQuery eq2 = new EmployeeQuery("eq2");

// This leaves out the record with Age 30
eq1.Where(eq1.Age < 30);
eq1.Union(eq2);
eq2.Where(eq2.Age > 30);

See this post for more …

DynamicQuery API – Prefetching (as opposed to Lazy Loading) is Now Supported

Of course, we still support Lazy Loading which is the default when accessing your hierarchical object model. However, you can now prefetch your model which can yield a nice performance boost. For example, this query loads a Parent, Child, and Grandchild in the form of Employee->Order->OrderDetails.

EmployeesCollection coll = new EmployeesCollection();
coll.Query.Prefetch(Employees.Prefetch_OrdersCollectionByEmployeeID);
coll.Query.Prefetch(Employees.Prefetch_OrdersCollectionByEmployeeID, Orders.Prefetch_OrderDetailsCollectionByOrderID);
coll.Query.Load();

See this post for more …

DynamicQuery API – Skip() and Take() Support Added

This is not to be confused with paging. Skip and Take are currently supported on most of the databases we support. However, they are not supported on Microsoft SQL, Oracle, or Microsoft Access.

AggregateTestCollection coll = new AggregateTestCollection();
coll.Query.Select(coll.Query.Id, coll.Query.LastName, coll.Query.IsActive);
coll.Query.Skip(8).Take(2);
if(coll.Query.Load())
{
   // At least one record was loaded
}

Other Fixes and Tweaks:

  • Added “UdtTypeName” to esParameter so types such as “geometry” can be used.
  • Fixed an issue with our PostgreSQL Metadata provider, in certain cases it was bringing back Composite ForeignKeys in an arbitrary order.
  • Project file loading is very fast (again).
  • Added a warning to remind you to save your project files if you change them (but not on window close).
  • Our EntitySpaces provider for Sybase is now bound to Sybase SQLAnywhere version 12
  • There is a new option that will include your schema name as a prefix on your classes, for instance dbo.Employee becomes “dbo_Employee” as a class name. This can be useful for RIA services when you desire all of your classes be in a single Domain Service so that they can be saved in a single transaction. This option is on the “Settings”, “Naming Conventions” tab.
  • The esEntity.Collection property is now a method, it’s GetCollection() now so that it doesn’t interfere with serialization.
  • You can now disable lazy-loading. This is used in conjunction with our prefetch logic and done automatically for you. 

    EmployeesCollection coll = new EmployeesCollection();
    coll.es.IsLazyLoadDisabled = true;

  • AttatchEntity() and DetachEntity() are now virtual methods

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 24, 2010 10:49:06 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, October 21, 2010

In our next production release of EntitySpaces 2010 (due out on October 25th, 2010) binding to your extra columns is much easier.  The sample below is binding to a column called “SupplierName” that was brought back via a join in our DynamicQuery API.

THE CURRENT WAY:

   1:  <navigation:Page x:Class="Silverlight_RiaServices.Views.ExtraColumn" 
   2:             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   4:             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   5:             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   6:             xmlns:es="clr-namespace:EntitySpaces.DynamicQuery;assembly=EntitySpaces.DynamicQuery.Silverlight"
   7:             mc:Ignorable="d"
   8:             xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
   9:             d:DesignWidth="640" d:DesignHeight="480"
  10:             Title="ExtraColumn Page" 
  11:             xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" 
  12:             xmlns:my="clr-namespace:BusinessObjects" xmlns:my1="clr-namespace:Silverlight_RiaServices.Web" 
  13:             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
  14:      <Grid x:Name="LayoutRoot">
  15:   
  16:          <Grid.Resources>
  17:              <es:esExtraPropertyBinder x:Key="PropertyBinder" />
  18:          </Grid.Resources>
  19:   
  20:          <riaControls:DomainDataSource AutoLoad="True" 
  21:              d:DesignData="{d:DesignInstance my:Products, CreateList=true}" Height="0" 
  22:              LoadedData="productsDomainDataSource_LoadedData" Name="productsDomainDataSource" 
  23:              QueryName="Products_LoadWithExtraColumnQuery" Width="0">
  24:              <riaControls:DomainDataSource.DomainContext>
  25:                  <my1:esDomainContext />
  26:              </riaControls:DomainDataSource.DomainContext>
  27:          </riaControls:DomainDataSource>
  28:     
  29:          
  30:          <sdk:DataGrid AutoGenerateColumns="False" ItemsSource="{Binding ElementName=productsDomainDataSource, Path=Data}" 
  31:              Margin="12" Name="productsDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected">
  32:              <sdk:DataGrid.Columns>
  33:                  <sdk:DataGridTextColumn x:Name="productIDColumn" Binding="{Binding Path=ProductID, Mode=OneWay}"  />
  34:                  <sdk:DataGridTextColumn Binding="{Binding ExtraColumns, Converter={StaticResource PropertyBinder}, ConverterParameter=SupplierName}" 
  35:                       Header="** Supplier Name **" />
  36:                  <sdk:DataGridTextColumn x:Name="categoryIDColumn" Binding="{Binding Path=CategoryID}"  />
  37:              </sdk:DataGrid.Columns>
  38:          </sdk:DataGrid>
  39:      </Grid>
  40:  </navigation:Page>

Lines 6, 16-18, and 33-34 have been the old way we have shown you to bind to your extra columns. They are no longer required, here is the new way:

RIA Silverlight Example

<sdk:DataGridTextColumn x:Name="SupplierName" Binding="{Binding [SupplierName], Mode=TwoWay}" Header="** Supplier Name **" />
or
<sdk:DataGridTextColumn x:Name="SupplierName" Binding="{Binding ExtraColumns[SupplierName], Mode=TwoWay}" Header="** Supplier Name **" />

WCF Silverlight Example

<sdk:DataGridTextColumn x:Name="SupplierName" Binding="{Binding ExtraColumns[SupplierName], Mode=TwoWay}" Header="** Supplier Name **"/>

No longer do you have to use the esExtraPropertyBinder method, or include the “es” namespace (line 6), or use that funky binding syntax. Your extra columns can even sort in Silverlight in some scenario’s, more on this later.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, October 21, 2010 6:30:09 AM (Eastern Standard Time, UTC-05:00)  #   
 Monday, October 18, 2010

If all goes well we plan to cut the production release on October 25, 2010.

Here at the fixes/features in this build

  • Fixed a bug when saving an entity within a hierarchical tree in RIA Services.
  • Added View support to our RIA Services infrastructure
  • Added “UdtTypeName” to esParameter so types such as “geometry” can be used.
  • Added Skip() and Take() to our DynamicQuery API (currently only supported by PostgreSQL and MySQL).
  • Fixed an issue with our PostgreSQL Metadata provider bringing back Composite ForeignKeys in an arbitrary order.
  • Project file loading is very fast (again).
  • Added a warning to remind you to save your project files if you change them (but not on window close).

The build is available and downloadable by all customers. Again, the production release is scheduled for October 25th at which time we will list all of the features added since our last production release which was 2010.1.0830.0.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, October 18, 2010 6:41:29 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, October 10, 2010
esvideo



The latest beta (2010.1.1011.0) is available for download to our customers and it will soon become our Trial Version. This is a dramatic improvement over our previous beta. The kinks have been mostly ironed out. We thought the quickest way to show you how our RIA Support works was with a video. This is definitely a video you’re going to want to watch.

Click on the image on the left to watch the video. This is the largest video we’ve made to date so give it a moment to download. It’s roughly 23 meg.

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 10, 2010 9:18:55 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, October 03, 2010

This beta should be the last beta before our official release which is only a few weeks away. Some of the features in this beta are as follows:

  • Support for hierarchical data in your Silverlight RIA Service applications.
  • Prefetch capabilities for your hierarchical object model (in addition to Lazy Loading) for a performance boost. 
  • The DynamicQuery API now supports Union, UnionAll, Intersect, and Except.

There are some other fixes as well. Over the next few weeks, while beta testing is going on, we will be adding some of the requests that have been made on our support forums to round out this release.

This beta version is 2010.1.1004.0 and can be used by those wishing to begin their EntitySpaces RIA services applications. We expect that the final release is only two weeks out.

 esvideo

Watch EntitySpaces serve up Hierarchical Data in the video above, pretty cool stuff …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 03, 2010 9:31:02 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, September 28, 2010

Prefetching

We now have Prefetching fully implemented. Below are some simple examples with timings.

Load all employees, their orders, and the order detail items with Prefetch

EmployeesQuery q = new EmployeesQuery("e");
q.Prefetch<OrdersQuery>(Employees.Prefetch_OrdersCollectionByEmployeeID);
q.Prefetch<OrderDetailsQuery>(Employees.Prefetch_OrdersCollectionByEmployeeID, Orders.Prefetch_OrderDetailsCollectionByOrderID);

// Load It
EmployeesCollection coll = new EmployeesCollection();
coll.Load(q);

foreach (Employees emp in coll)
{
    foreach (Orders order in emp.OrdersCollectionByEmployeeID)
    {
        foreach (OrderDetails detail in order.OrderDetailsCollectionByOrderID)
        {

        }
    }
}

When we do this for all Employees in our table (600 employees, all their orders, and all their order detail items) without prefetch it takes roughly 500+ milliseconds with prefetch it takes 25 milliseconds, so you can see what a dramatic performance boost this can provide. In most cases lazy loading is fine, however, when you need to prefetch the ability will be there for you. Also, notice that there is not a separate API, you call Load() just like you do now, all you need to do is designate the data you want to prefetch.

You can also tweak the data that is prefetched. In this case, we are limiting our query (including the prefetched data) to all employees with an EmployeeID < 5 and orders shipping to “Indianapolis”. This allows you to control what records are being loaded in the hierarchical object model.

// The Main Query
EmployeesQuery q = new EmployeesQuery("e");
q.Where(q.EmployeeID < 5);

// The OrdersCollection
OrdersQuery o1 = q.Prefetch<OrdersQuery>(Employees.Prefetch_OrdersCollectionByEmployeeID);
EmployeesQuery emp1 = o1.GetQuery<EmployeesQuery>();
o1.Where(emp1.EmployeeID < 5 && o1.ShipCity == "Indianapolis");

// The OrdersDetailsCollection
OrderDetailsQuery od = q.Prefetch<OrderDetailsQuery>(Employees.Prefetch_OrdersCollectionByEmployeeID, Orders.Prefetch_OrderDetailsCollectionByOrderID);
EmployeesQuery emp2 = od.GetQuery<EmployeesQuery>();
OrdersQuery o2 = od.GetQuery<OrdersQuery>();
od.Where(emp2.EmployeeID < 5 && o2.ShipCity == "Indianapolis");

// Load It
EmployeesCollection coll = new EmployeesCollection();
coll.Load(q);

You also have the ability to turn on or off Lazy Loading.

Union, Intersect, and Except

We have added the ability to perform these operations. The samples below are simple queries from our NUnit test suite.  These might be kind of silly but these tests are for merely validating the syntax.

Union

EmployeeQuery eq1 = new EmployeeQuery("eq1");
EmployeeQuery eq2 = new EmployeeQuery("eq2");

// This leaves out the record with Age 30
eq1.Where(eq1.Age < 30);
eq1.Union(eq2);
eq2.Where(eq2.Age > 30);

Intersect

EmployeeQuery eq1 = new EmployeeQuery("eq1");
EmployeeQuery eq2 = new EmployeeQuery("eq2");

// This leaves out the record with Age 30
eq1.Where(eq1.FirstName.Like("%n%"));
eq1.Intersect(eq2);
eq2.Where(eq2.FirstName.Like("%a%"));

Except

EmployeeQuery eq1 = new EmployeeQuery("eq1");
EmployeeQuery eq2 = new EmployeeQuery("eq2");

// This leaves out the record with Age 30
eq1.Where(eq1.FirstName.Like("%J%"));
eq1.Except(eq2);
eq2.Where(eq2.FirstName == "Jim");

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, September 28, 2010 7:18:32 AM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, September 22, 2010

This is not fully working yet, however, a lot of the mechanics are now worked out. We are working on providing you with the ability to prefetch data as opposed to lazy loading it. Let’s take a look at how this might look:

EmployeesQuery q = new EmployeesQuery("e");
q.Where(q.EmployeeID < 5);
q.Prefetch(Employees.OrdersCollectionByEmployeeID_Prefetch);
q.Prefetch(Employees.OrdersCollectionByEmployeeID_Prefetch, Orders.OrderDetailsCollectionByOrderID_Prefetch);

EmployeesCollection coll = new EmployeesCollection();
coll.Load(q);

Notice that we are only loading the Employees with an EmployeeID < 5. However we are asking EntitySpaces to go ahead and load each employees Order records and to load each orders’ OrderDetail records. Suppose there were four employees loaded by the above query. If we asked EntitySpaces to load each Employees ‘orders’ it would be an individual trip to the database for each employee if we relied on our normal lazy loading (in most cases this is just fine). With Prefetching we will fetch all of the orders for all four employees in a single wire trip. The same holds true for the OrderDetail records, a single wire trip.

Each Prefetch() call on the query sets up a trip to the database. In the 1st prefetch we are asking for the Employees.OrdersCollection. In the 2nd Prefetch() call we are asking for the OrderDetailCollection but we need to map it through the OrderCollection. The API above isn’t set in stone, if we can make it more readable we certainly will.

The above prefetch query loads up front all of the records necessary to satisfy the code below in three trips to the database.

foreach (Employees emp in coll)
{
    foreach (Orders order in emp.OrdersCollectionByEmployeeID)
    {
        foreach (OrderDetails detail in order.OrderDetailsCollectionByOrderID)
        {
            Console.WriteLine(detail.UnitPrice.ToString());
        }
    }
}

The three queries are as follows:

SELECT * FROM Employees e WHERE e.EmployeeID < 5

SELECT o.* FROM [Orders] o
INNER JOIN Employees e ON e.EmployeeID = o.EmployeeID
WHERE e.EmployeeID < 5

SELECT od.* FROM [Order Details] od
INNER JOIN Orders O ON od.OrderID = o.OrderID
INNER JOIN Employees e ON e.EmployeeID = o.EmployeeID
WHERE e.EmployeeID < 5

You can also turn off LazyLoading which will turn out to be very important when serializing your prefetched hierarchical model. Of course, LazyLoading is on by default. This functionality should prove very beneficial to our RIA Services support. We can then also add this support to our proxy stubs which maintain rowstate and column state in POCO’s, yes, hierarchical proxy stubs. Of course, this can really help boost performance for those working with large hierarchical sets of data.

The is just a sneak preview, hopefully we wont hit a snag. Stay tuned for more information ...

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, September 22, 2010 10:18:35 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, September 15, 2010

Thanks Trevor for alerting us to this contest. In the first drop down is the Add-In category, you will find EntitySpaces listed there. We are pretty proud of the sophistication of our VS Add-In and hope you will take the time to vote for us (and time is running out, voting ends September 21st).

See the 2010 DevProConnections Community Choice Awards …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, September 15, 2010 6:30:14 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, September 12, 2010

We are pleased to announce the EntitySpaces RIA Services beta (2010.1.0913.0). This is a trial version, do not use this for production as it will eventually expire. Also, unless you are interested in RIA services you should not install this beta. You can download the RIA Services Beta Here. You definitely should watch the first video below, it was made to go along with the actual beta release.

There are two changes that might effect your code (most people will not notice these two changes):

  1. The single Entity “Collection” property is no longer a property, it is a method called GetCollection()
  2. The “.str” property (really only used by esDataSource) is now a method, ie, .str()

Also, we didn’t have time to bring back the “extra properties” that are brought back via joins. This feature will work in our next release and already works for our non RIA Services Silverlight methodology shown in the third video below.

You must regenerate your code for this beta.

 esvideo

The video above will explain the sample that comes with the beta, there have been some tweaks since our previous video which is listed below.

esvideo

The video above is our first RIA Services video, if you haven’t seen this video and our about to start using or evaluating EntitySpaces for a RIA services application you should definitely watch it.

esvideo

The video above demonstrates the EntitySpaces support for non RIA Services based Silverlight applications. We have a template that will create your WCF Services for you. We also have server and client proxies that track row level and column level dirty state for you. It’s very powerful. RIA Services are cool, but if you want total control this is the way to go.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/RIA/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, September 12, 2010 10:39:49 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, September 06, 2010
esvideo

This video demonstrates how you can use EntitySpaces in a Microsoft RIA Services Silverlight application development scenario. EntitySpaces works extremely well as your RIA data architecture. But EntitySpaces doesn’t stop there, we also generate your Domain Services and you Metadata rules (data validation rules). This is simply a must see video, we’re really excited about this functionality.

Whether RIA Services is merely a buzzword you’ve heard bounced around or you’re a seasoned Silverlight developer you should checkout this functionality. When you combine EntitySpaces with RIA Services you will almost instantly be able to create professional quality Silverlight applications.

EntitySpaces 2010.1.0830.0 is shipping now. Our RIA Services functionality (shown in the video above) will be available in beta within a week or so. If you are interested in participating in the beta please email support@entityspaces.net with “RIA Services” in the title.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, September 06, 2010 8:56:57 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, September 01, 2010

esvideo

Sometimes you’re so busy designing, coding, testing, and supporting a product that you don’t take the time to stop and appreciate what you have actually accomplished. A customer of ours asked us to create a video overview of our Silverlight functionality and in doing so we had to step back and say “wow”, this is pretty cool. It truly is easy to use EntitySpaces to create a Silverlight application as you will see.

This video shows the various pieces of an EntitySpaces application for Silverlight:

1) The EntitySpaces architecture itself.

2) The WCF Service to retrieve the data.

3) Some kind of row level, column level tracking on the Silverlight side of things (our proxies).

The good news is that EntitySpaces provides all three of these for you and more as you will soon see. The real beauty in this video is how the EntitySpaces server and client proxies are used to serialize data back and forth across the wire all the while tracking row level and column level dirty state. Also, the creation of the WCF service itself which utilizes the EntitySpaces architecture and allows you to take full advantage of the EntitySpaces DynamicQuery API under Silverlight is awesome. In fact, it’s hard to tell that you’re not on the server side because our client proxies look and feel just like the full EntitySpaces architecture.

Well, enough talk. Click on the image above and check out the video, it’s kind of large so give it a minute to download, but it’s worth it. Pay close attention to how few lines of code we actually wrote by hand to create our Silverlight demo, and how simple those lines of code actually are. There’s already a lot to learn when you start working with Silverlight, why not make it easy on yourself and use EntitySpaces? Our Trial version is fully functional and comes with everything you see in this video, including the demo in C# or VB.NET.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, September 01, 2010 8:25:41 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, August 29, 2010

This release of EntitySpaces adds two new databases, adds Silverlight 4 support (we already supported Silverlight 3), provides some excellent proxy improvements, and finally it provides a few well placed customer requested tweaks. EntitySpaces 2010.1.0830.0 is available to customers for download now. Our trial version will be upgraded by Tuesday night, perhaps sooner.

It is recommended that you regenerate your “Generated” classes and any proxies you may be using. Also, we recommend that you re-generate any WCF Services that you may be using that were generated by EntitySpaces in order to realize the improvements mentioned below.

Two New Databases

  • Microsoft SQL Azure is now supported. Just choose “SQL Azure” in the “Driver” dropdown on the settings tab and generate your architecture as you would normally. You still use our normal EntitySpaces.SqlClientProvider.dll provider when running your SQL Azure application.
  • Microsoft SQL Server Compact 4.0 is now supported. We already support 3.x and we now we also support the 4.0 Technology Preview release. The SQL CE 4.0 CTP can be found HERE. This version of the SQL Server Compact Edition passes more of our unit tests than did the 3.x version. For instance, 4.0 supports paging. Also, we have upgraded our SQL CE 3.x driver to 3.5.1.0.

    To connect to the SQL CE 4.x driver use this in your connection string (only needed when generating code):

    Data Source=C:\SomeDatabase.sdf;Version="4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91";

Proxy Improvements

  • We now provide both Silverlight 3.0 and 4.0 Assemblies (please notice the folder structure change in your Runtimes folder for the Silverlight assemblies).
  • Added Collection.LoadAll() methods to the generated WCF Services (See our WCF Template).
  • Added IsDirty() to both the single entity and collection proxy stub classes.
  • Fixed a minor bug in the Collection.Save() method in the Proxy classes. The deleted entities were being brought back in the return collection from Save(), this has been fixed. This was not reported by a user, we found this in our testing.

Other Improvements and Fixes

  • There was an issue with calling Find() on a binding source. This has been fixed.
  • Added HasFilter on the Collection class and added a “get” on the Filter property.
  • Collection.AddNew() was made virtual so that it can be overridden.
  • There was an issue with our collections not working in Windows Forms design mode, this has been fixed.
  • Reworked our C# and VB.NET Windows.Forms samples.
  • Reworked our WCF Demo so that it now uses an ES generated WCF Service.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, August 29, 2010 10:22:44 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, August 25, 2010

Although the ORMBattle.NET charts have not been updated yet we thought we would share the results with you. The stats shown below are the stats that they will use to update the charts on their site (they use the 1000 item tests). We think we did pretty well. The numbers shown below are from the ORMBattle.NET site.

First let’s talk about where EntitySpaces did really well.

BLT = BLToolkit
EF  = Microsoft Entity Framework
ES  = EntitySpaces
DO  = DataObjects.Net
LC  = LinqConnect
LS2 = LINQ to SQL
NH  = NHibernate
OA  = OpenAccess

SS = SubSonic

Our “Single Operation” Tests

Let’s first take a a look at the Single Operation CRUD performance tests. These are single entity updates. So, the first set of numbers highlighted in blue are our numbers and we scored very high. These numbers are very important because they represent 1000 entities being created, building the dynamic SQL to do the update/insert/delete, a wire trip to the database, and returning any modified fields such as identity columns. In other words, the full meal deal.

It is obvious from these numbers EntitySpaces can do this very efficiently. Our “Multiple Operation” tests are discussed below.


ormbattle


Our “Multiple Operation” Tests

We didn’t score as high here as we would have liked. It’s important to note that when saving a collection (a collection merely contains single entities) we use the exact same logic as when we save a single entity. So you must be thinking since we scored so well in the “Single Operation” tests why then aren’t we at the top of the “Multiple Operations” tests? Well, one of the nice things about EntitySpaces is that it truly only updates only those columns which are dirty. This means we created unique SQL for every single row (1000 of them in this case) when in reality we only needed to build the SQL one time since the test uses a for loop and changes the exact same columns for each row. However, even with this extra functionality we handily out performed the Microsoft Entity Framework, LINQ to SQL, and SubSonic. We are not sure if the other architectures updated only the modified columns or all columns, we suspect they update them all, but it really wont matter soon as you will see.

We have long known we could optimize here and that is exactly our plan. All we must to do is examine the ModifiedColumns collection of the previous row to see if we can reuse the same SQL statement. Once we do that our numbers will shoot up dramatically (and you will of course benefit). In fact, we expect to be at or near the top in that category as well on our next run. These changes are simple to make. Once we make these changes we will publish before and after numbers using the exact same code from the ORMBattle.NET site and publish those here so you can see the improvements, and we expect those to be dramatic. Once ORMBattle.NET does another round of testing these new numbers will be published there as well.

Native Query and Native Materialize Tests

We also scored very well in the Native Query test which uses our DynamicQuery API and we scored near the top in the Native Materialize test which does a LoadAll() on a collection and then merely does a foreach loop through each entity (this tests materializing each row). You can see how fast we are in those two tests and loading a large collection is extremely fast in EntitySpaces.

LINQ Tests

Note that there are no “n/a” entries for EntitySpaces. This is kind of interesting since most of our customers use our DynamicQuery API and not LINQ. However, we do support LINQ when the ADO.NET provider we are using supports it. This is true for 4 or 5 of the database systems we support.

Next Steps

Other than the “Multiple Operation” tests we have one other issue to fix, and that is when a massive collection “delete all” operation is performed. Our MarkAllAsDeleted() moves all of the deleted entities into a deleted list one by one. We can do this in one big operation instantly so that we’ll be fixed as well. We know we will drastically increase our collection save logic and we’ll post those numbers (before and after soon). First though, we need to get this weekend’s release out with our SQL Azure support.

After we make our next round of performance changes we expect EntitySpaces to be at or near the top in almost every category, and we’re already well on our way. This performance work will happen immediately after this weekends release, so stay tuned. Our entry into ORMBattle.NET fray is going to benefit you the customer because it’s something that we take very seriously. We are happy with round one, but round two is going to put us in a very good position.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, August 25, 2010 10:06:49 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, August 21, 2010
SQL-Azure

Our SQL Azure support now successfully passes our NUnit test suite. It is our plan to release our SQL Azure support on Monday, August 30th. There are also other Cloud databases we are looking at.

There is a new choice in the “Settings” tab in the driver combo-box called “SQL Azure”, you just select it, connect, and generate your EntitySpaces architecture as you would normally.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, August 21, 2010 1:24:14 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, August 16, 2010

This release is recommended if your application is a Windows.Forms application. We fixed a bug that happened when the user pressed the “escape” key while editing in a grid. If you are upgrading from our 2010.1.0802.0 release there is no need to regenerate your classes.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, August 16, 2010 4:58:56 AM (Eastern Standard Time, UTC-05:00)  #   
 Friday, August 13, 2010

The Microsoft SQL Server 2008 FILESTREAM type can be a bit tricky to figure out. Hopefully this post will help those interested in using it. The first thing you need to do is enable FILESTREAM in your SQL Server 2008 instance. The instructions can be found HERE.

Our next step was to create our SQL table for testing.

CREATE TABLE [dbo].[FileStreamEmployees]
(
    [EmployeeId] [int] NOT NULL,
    [Photo] [varbinary](max) FILESTREAM  NULL,
    [RowGuid] [uniqueidentifier] ROWGUIDCOL  NOT NULL
)

Notice that we have our Photo column set as our FILESTREAM column (shown above).

Our next step was of course to create our “Gnerated” and “Custom” classes. These classes are generated for you in seconds, see this video if you are new to EntitySpaces.

One of the tricks when working with SqlFileStream (which is located in the System.Data.SqlTypes namespace) is that it requires a transaction. So, what we did was make a tiny little class called esSqlFileStream that would hold onto both the esTransactionScope instance and the SqlFileStream instance. Let’s look at how all this works.

First, we created a sample record to play with.

// Create a sample record just for the demo
FileStreamEmployees emp = new FileStreamEmployees();
emp.EmployeeId = 1;
emp.Photo = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
emp.Save();

Now, let’s execute some code and see if we can read back the Photo column using streaming and not the entity itself.

//---------------------------------
// Let's test reading
//---------------------------------
esSqlFileStream stream = FileStreamEmployees.GetFileStream(1, FileAccess.Read);

int length = (int)stream.Length;
byte[] data = new byte[length + 1];

// Fill our data buffer
stream.Read(data, 0, length);
stream.Dispose();

Notice that we call a static method on our FileStreamEmployees entity named GetFileStream(). We added that to our Custom class. We’ll take a look at that method in just a moment. Also, we could have used the using() syntax on the esSqlFileStream object but we wanted to demonstrate how you could create an esSqlFileStream object and then pass it around to other methods if need be. This is why we needed to manually call Dispose on it in the sample above. 

Now, let’s execute some code and see if we can write to the Photo column using streaming (and without calling Save on the entity).

//---------------------------------
// Let's test writing
//---------------------------------
esSqlFileStream stream = FileStreamEmployees.GetFileStream(1, FileAccess.Write);

data = new byte[] { 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15 };
stream.Write(data, 0, data.Length);
stream.Dispose();

Pretty simple looking really. There is one very important thing to note here. As long as you’re holding onto an esSqlFileStream there is a transaction open. So, you want to get in and out as fast as you can just as you would whenever you are holding a transaction open. Now, let’s take a look at our static GetFileStream() method which is located in our FileStreamEmployees Custom class.

using System;
using System.IO;
using System.Data.SqlTypes;

using EntitySpaces.Core;
using EntitySpaces.Interfaces;
using EntitySpaces.DynamicQuery;

namespace BusinessObjects
{

    // This is in our “Custom Class”
    public partial class FileStreamEmployees : esFileStreamEmployees
    {
        static public esSqlFileStream GetFileStream(int id, FileAccess access)
        {
            esSqlFileStream fileStream = new esSqlFileStream();

            FileStreamEmployeesQuery q = new FileStreamEmployeesQuery();
            q.Select("<Photo.PathName() as [Path]>", "<GET_FILESTREAM_TRANSACTION_CONTEXT() as [Context]>");
            q.Where(q.EmployeeId == id);

            FileStreamEmployees fsEmp = new FileStreamEmployees();
            fsEmp.Load(q);

            fileStream.Create((string)fsEmp.GetColumn("Path"),
                (byte[])fsEmp.GetColumn("Context"), access, FileOptions.SequentialScan, 0);

            return fileStream;
        }
    }
}

Notice that we use the “Raw SQL” feature to inject this very SQL Server specific code into our Select() statement. Remember that EntitySpaces is database independent and we try to avoid polluting the core with DBMS specific functions. Typically, you use very little or no “Raw SQL” in EntitySpaces. However, this mechanism is a really nice escape hatch when needed. Basically, the method above fetches the path to our Photo blob and uses the esTransactionScope transaction which is created in the constructor of the esSqlFileStream class.

Finally, let’s look at the esSqlFileStream class.

using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.IO;
using System.Linq;
using System.Text;

using EntitySpaces.Interfaces;

namespace BusinessObjects
{
    public class esSqlFileStream : IDisposable
    {
        public esSqlFileStream()
        {
            scope = new esTransactionScope();
        }

        public void Create(string path, byte[] transactionContext, FileAccess access, FileOptions options, long allocationSize)
        {
           stream = new SqlFileStream(path, transactionContext, access, options, 0);
        }

        public int Read(byte[] buffer, int offset, int count)
        {
            return stream.Read(buffer, offset, count);
        }

        public void Write(byte[] buffer, int offset, int count)
        {
            stream.Write(buffer, offset, count);
        }

        public long Length
        {
            get
            {
                return stream != null ? stream.Length : 0;
            }
        }

        public void Dispose()
        {
            stream.Close();
            stream.Dispose();
            scope.Complete();
        }

        private esTransactionScope scope;
        private SqlFileStream stream;
    }
}

Notice that there is no error handling in this sample code. We wanted to keep this simple so it could be easily understood. Basically, the esSqlFileStream class wraps the SqlFileStream and holds onto the esTransactionScope during its lifetime. You only need to remember to call Dispose() or use it within a using() statement.

This really isn’t a class that we’ll include in the EntitySpaces architecture. This post is merely to show one way to potentially work with SqlFileStream objects in your application, if you plan to use them. Comments are welcome …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, August 13, 2010 9:25:29 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, August 08, 2010

We updated our Getting Started Video (which is also on our download page). The video uses EntitySpaces 2010 and Visual Studio 2010 and shows how within seven minutes you’re ready to run your first EntitySpaces application.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, August 08, 2010 4:40:53 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, August 01, 2010

This is a minor release, there is no need to upgrade unless you need one of the fixes below. The fixes are as follows:

The Trial version for 2010.1.0802.0 will be posted late Sunday night, you will know it has been posted when the Trial Download page has the proper version on it.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, August 01, 2010 12:55:23 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, July 25, 2010

This is a minor release, there is no need to upgrade unless you need one of the fixes below. The fixes are as follows:

  • The WCF Client Side Proxy Patch is included (it was not included with 2010.1.0720.0)
  • The namespace "Proxies" was hard coded in the client proxy template, this was fixed.
  • The “char” modified column count error has been fixed.
  • The case sensitive bug when returning columns with a different case than defined in the actual table error has been fixed.

The Trial version is still 2010.1.0720.0

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, July 25, 2010 10:39:06 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, July 05, 2010

This release does not provide any changes to the EntitySpaces architecture. The architecture is still versioned 2010.1.0628.0. However, we did have some changes to tools and we needed to cut this maintenance release for that reason. It is not necessary to regenerate your code if you are upgrading from 2010.1.0628.0. Finally, unless you need one of the changes listed below there is no need to upgrade.

The changes are as follows:

  • The WCF Templates now handle views properly
  • There was a bug on some machines that would not allow them to run offline, this has been fixed.

Also …

Proxy Server/Firewall Support for Licensing

proxyserver

You can supply your companies proxy information in order to validate you license. The proxy server connection settings are encrypted in the settings file and not laying around in plain text.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, July 05, 2010 8:36:36 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, June 27, 2010

We are pleased to announce the release of EntitySpaces 2010. EntitySpaces 2009 and 2010 run side by side just fine, so you can have them both installed. The official release is version 2010.1.0628.0 and is available for purchase now (or download by existing customers).

Features and Changes

  • Added support for .NET 4.0 and dropped support for .NET 2.0
  • Visual Studio AddIn runs in VS2005/VS2008/VS2010.
  • Added support for SQLite.
  • Improvements to our proxies (row and column level dirty state tracking) for even better Silverlight and WCF support.
  • Proxies support extended columns (brought back by dynamic queries) and even allow binding under Silverlight and WPF.
  • Ships with a template that can generate your WCF Templates which support EntitySpaces out of the box.
  • Project files are now path relative.
  • Enhanced debugging features.
  • Cross Catalog/Schema DynamicQuery support.
  • Re-architected such that our entities and collections no longer contain DataTable’s and DataRow’s for data storage.
  • Our collections now implement IList<T>
  • You can now filter and sort collections with IQueryable using sophisticated LINQ expressions.
  • Many other changes and fixes.
  • EntitySpaces 2010 now requires a license key, all existing customers should have their key(s) on their “my licenses” page.
    See this post for more details: click here …

The release notes can be found Here …

Sample Applications Provider

  • Windows Forms (C#/VB)
  • Silverlight (C#/VB)
  • esDataSource (C#/VB), this is our custom data source control
  • Compact Framework (C#)
  • WCF Sample (C#)

Preview Videos

During development we published some preview videos that you might want to watch for more details.

EntitySpaces 2010 Sneak Preview (I)
EntitySpaces 2010 Sneak Preview (II)
EntitySpaces 2010 Sneak Preview (III)
EntitySpaces 2010 Sneak Preview (IV)

Databases Supported

  • Microsoft SQL Server / SQL CE
  • Microsoft Access
  • Oracle
  • MySQL
  • VistaDB
  • PostgreSQL
  • Sybase SQL Anywhere
  • SQLite


Please note that the source code is not yet available for download, for those customers with download rights to the source it will be available soon, we just need to update the installer.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 300k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, June 27, 2010 9:55:23 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, June 25, 2010
This is not an EntitySpaces Sponsored Contest.

ms_mysql_2010_mainbanner

Migrate MySQL to SQL Server Contest

$5000 grand prize! $1000 runner-up prizes.

Submit your newly migrated or cross platform application that now supports not only MySQL but also Microsoft SQL Server or SQL Azure and be eligible to win $5000 and take advantage of Microsoft Partner Network benefits.

Being compatible with SQL Server can help:

  • Increase revenue opportunities for your business
  • Provide built in Business Intelligence capabilities at your fingertips
  • Lower development costs
  • Give you a seamless path to the cloud

See http://www.codeproject.com/Competitions/417/Migrate-to-MySQL-to-SQL-Server-Contest.aspx


We received an alert about this contest in our email. Of course, cross database applications are a breeze with EntitySpaces. In fact, our NUnit test suite uses the same physical binary to run again all of our supported Databases. We’d love to see an EntitySpaces application win this contest. The deadline is June 30th, 2010 so act quickly if you’re interested.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, June 25, 2010 5:38:25 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, June 10, 2010

We are often asked about enterprise licensing and we are glad to be able to offer two new enterprise licensing options. These options won’t be available until after we ship EntitySpaces 2010 which is tentatively scheduled for June 21st. However, the trial version is available now. The trial is our EntitySpaces 2010 beta and it’s very stable. All customers have access to the EntitySpaces 2010 beta as well via our downloads section. So you can get started now with the trial version. The trial is fully functional and you can purchase an Enterprise License once we ship if you are interested in an enterprise license. Otherwise you can purchase today as usual if you are not interested in an enterprise license. For larger shops, the Enterprise Licensing options are very attractive.

Enterprise Level 1 - $2,999.00

15 licenses + Source to the EntitySpaces Architecture assemblies

Enterprise Level 2 - $4,999.00

50 Licenses + Source to the EntitySpaces Architecture assemblies


Advantages of an Enterprise License

Shown below is our pricing structure with the proper discounts if you were to purchase in bulk without the advantage of one of our new Enterprise licensing options. The individual pricing shown below still exists and is valid. Keep in mind that the source code (currently not available for sale until the new Enterprise licenses go online) was $499.00. So, in the past, if you wanted to purchase the equivalent of our Enterprise Level 1 license you would have had to pay $3,588.00 + 499.00 for the source. However, once we ship EntitySpaces 2010 you can purchase the same value for only $2,999.00.

Price Quantiy Discount Total
299 1 0.00% $299.00
299 2 10.00% $538.20
299 3 10.00% $807.30
299 4 10.00% $1,076.40
299 5 20.00% $1,196.00
299 6 20.00% $1,435.20
299 7 20.00% $1,674.40
299 8 20.00% $1,913.60
299 9 20.00% $2,152.80
299 10 20.00% $2,392.00
299 11 20.00% $2,631.20
299 12 20.00% $2,870.40
299 13 20.00% $3,109.60
299 14 20.00% $3,348.80
299 15 20.00% $3,588.00
299 16 20.00% $3,827.20
299 17 20.00% $4,066.40
299 18 20.00% $4,305.60
299 19 20.00% $4,544.80
299 20 20.00% $4,784.00

The Source code will no longer be for sale as individual purchase, it will only be available to Enterprise License holders. If you currently have a source code license you will still be able to download the source code. However, your renewal will be at the new Enterprise Licensing model price once your current license expires.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, June 10, 2010 9:55:20 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, May 31, 2010

The fixes and changes are as follows:

  • The ListChanged event handling was improved.
  • The WebAdmin Grid templates were fixed and the GridLoader projects are now included (they are not on the menu yet and can be found in the samples folder).
  • Getting started document was updated with ES2010 screen shots.
  • Many fixes in the VB.NET templates (fixes in FindByPrimaryKey/LoadByPrimaryKey).

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, May 31, 2010 5:44:52 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, May 25, 2010

No Registration Required … Simply click HERE to download your copy today …

Product Features

Databases Supported

  • Microsoft SQL Server / SQL CE
  • Microsoft Access
  • Oracle
  • MySQL
  • VistaDB
  • PostgreSQL
  • Sybase SQL Anywhere
  • SQLite

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, May 25, 2010 9:32:02 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, May 24, 2010

All customers may now download and install the EntitySpaces 2010 beta. If you are currently running an Early Adopter release we recommend that you upgrade to the beta release. You can download it under the "Products" menu under "Downloads". You can run ES2009 and ES2010 side by side, they do not interfere with each other. There are release notes on the "EntitySpaces 2010" menu after installation and there are a few breaking changes if you are moving from ES2009 to ES2010. If no problems are reported we plan to release this as our current Trial version.

The release notes for moving from ES2009 to ES2010 can be found HERE. They can also be found on your “EntitySpaces 2010” Windows menu after installation.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, May 23, 2010 11:49:31 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, April 14, 2010

ES2010_VS2010

This is a snapshot of EntitySpaces 2010 running inside of Visual Studio 2010, of course it runs inside of VS2008 and VS2005 as well.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, April 13, 2010 11:26:14 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, March 11, 2010

The dates are as follows:

March 29th - Early Adopter Program

The early adopter release will be available to a limited set of EntitySpaces customers who have a real need for some of the new or enhanced EntitySpaces 2010 features (such as Silverlight, WCF, Smart Proxies, SQLite, JSON serialization). We are looking for customers who desire to upgrade to ES2010 now and continue developing through to release. Prime candidates are new customers working on projects that haven’t shipped yet who can easily upgrade and begin working with ES2010. If you are interested in participating in our Early Adopter Program please send an email to earlyadopter@entityspaces.net with your EntitySpaces user id and how you plan to use EntitySpaces 2010. Not everyone who sends an email will be chosen to participate. Again, we are looking for users who are really going to use this version for development. We are seeking about 20 users to participate and they will be hand picked based on the email we receive explaining how ES2010 will be used. For example, we are interested in Windows Forms, ASP.NET, Silverlight, and so on, in other words, a good cross section of development. Current forum participation will also help in being chosen (active users).

Keep in mind that EntitySpaces 2010 will not support .NET 2.0, it’s .NET 3.5 and forward. We are unsure at this point if .NET 4.0 assemblies will be included in the Early Adopter Program.

April 19th  – Public Beta (customers only)

We are planning on only one beta. This beta will be available to all customers. We realize that the beta window looks short here but this release will have passed all of our unit tests and will have been pretty heavily used by those participating in the Early Adopter Program.

April 29th – Official Release

This is our official release. The EntitySpaces 2010 Trial version will also be available as well for the general public.

 

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, March 11, 2010 11:54:38 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, March 08, 2010
screenshot

We hope to announce a release date for EntitySpaces 2010 very soon.

We now handle schemas better and allow you to have the same table or view name in multiple schemas. You can see the Address table selected twice (in different schemas) in the Custom Template to the right. They will both create an Address.cs file so you would need to generate each schema into a different folder, but it’s great that this all works now.

We working our way through the wish list and we have switched to the Tarma Installer which we really like.

 

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, March 08, 2010 8:27:55 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, March 03, 2010

We get a lot of questions about JSON serialization so we thought we would do a blog post on it. This code was executed using EntitySpaces 2010 but it should work the same for EntitySpaces 2009. We used the the NET 3.5 JSON serializer "DataContractJsonSerializer" located in the “System.Runtime.Serialization.Json” namespace which is in the “System.ServiceModel.Web” assembly.

Let’s take a look at a easy sample.

Employees emp = new Employees();
emp.Query.es.Top = 1;
emp.Query.Select
(
    emp.Query.EmployeeID, emp.Query.FirstName,  emp.Query.LastName, emp.Query.HireDate,
    (emp.Query.LastName + ", " + emp.Query.FirstName).As("Fullname")
);
emp.Query.Load();

// Modify the first name ...
emp.FirstName = "Freddy";

// Serialize it using our EmployeesProxyStub
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(EmployeesProxyStub));
MemoryStream ms = new MemoryStream();
ser.WriteObject(ms, (EmployeesProxyStub)emp); // Cast it (we have a built in cast operator)

string json = Encoding.Default.GetString(ms.ToArray());
ms.Close();

// Convert it back into an object
MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(json));

ser = new DataContractJsonSerializer(typeof(EmployeesProxyStub));
EmployeesProxyStub empProxy = ser.ReadObject(ms) as EmployeesProxyStub;
ms.Close();

Employees emp2 = empProxy.Entity;  // Now we have a reconstituted object

This is what the Empoyee object looks like when serialized in JSON …

{"EmployeeID":1,"LastName":"Burns","FirstName":"Freddy","HireDate":"\/Date(704692800000-0400)\/",
"esRowState":"Modified","ModifiedColumns":["FirstName"],"ExtraColumns":[{"Key":"Fullname","Value":"Burns, Fred"}]}

It also deserializes just fine. You can do the same thing with our Collections, you just would just use the EmployeesCollectionProxyStub and the EmployeesCollection classes.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, March 03, 2010 9:29:24 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, March 02, 2010

Warning: A feeling of euphoric power coupled with feelings of invincibility have been noted by the EntitySpaces Development Team when using EntitySpaces 2010. This will be especially true for those customers using Silverlight and WCF together. The interaction between these technologies and EntitySpaces 2010 could prove to be more than some customers can handle. Please check with your IT staff to make sure this combination is safe for you.

Also, the performance increase in EntitySpaces 2010 is significant, customers are urged to throttle back and work their dosage up slowly to maximum as to not overwhelm their DBMS systems.

Finally, in more extreme cases developers have been seen ‘strutting’ down hallways trash talking wildly about how their product is going to destroy their competition. Other signs may include finishing tasks way ahead of schedule, begging team leads incessantly for more work to do, and working seven, dare we say, six hour days, and spending more time with their families.

If you recognize any of these symptoms don’t be alarmed, instead be sure to pat the developer on the back and say to them “Job well done”. If your competition is getting ahead and your company is still struggling you might try to find out if there development team is all hopped up on EntitySpaces. If they’re winning bid after bid and you’re losing out to them there is a good chance this is the case. The good news is you too have the same access to EntitySpaces, no prescription required.

Please, use EntitySpaces 2010 responsibly.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, March 02, 2010 11:10:38 AM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, February 27, 2010
kick it on DotNetKicks.com     Shout it

We are very pleased to be able to show you some of the awesome power coming in EntitySpaces 2010. We think ES2010 provides unmatched power when it comes to working with Silverlight and WCF services. Not only do our smart proxies track row state but they also track column dirty state. You can now bring back extra columns that are fetched via joins (or derived columns) to the client . Probably one of the most awesome feature is the ability to bind to these extra columns under Silverlight. As far as we know we are the only architecture that allows you to do this. You can actually bind to properties for which you have no property accessors, think of it as ITypedList for Silverlight if you will.

video

PART ONE

This first video is key to understanding our WCF Serialization capabilities. We think you will be impressed. The XML is shown each step along the way from server to client and back again. We use our own wrapper for the DataContract serializer to make things easy to demo. We think once you see this you will begin to understand what we have accomplished. Don’t skip this video, it is key to able to understanding Part Two.

video

PART TWO

This second video shows everything in Part One working in a real WCF / Silverlight application. We even bind to the extra column brought back via our Dynamic Query. And this column is not a property in our strongly typed entity. However, be forewarned, we don’t show the mechanics behind this for competitive reasons, once we ship ES2010 it will be made known.

 EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, February 27, 2010 3:52:18 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, February 14, 2010

All of the templates are converted now, including the C#, the VB.NET, and the the templates that generate stored procedures (they are also much easier to read). The following list of EntitySpaces Data Providers have been converted over to the new faster ES2010 approach.

  • EntitySpaces.MSAccessProvider
  • EntitySpaces.MySqlClientProvider
  • EntitySpaces.Npgsql2Provider
  • EntitySpaces.NpgsqlProvider
  • EntitySpaces.OracleClientProvider
  • EntitySpaces.SqlClientProvider
  • EntitySpaces.SqlServerCeProvider
  • EntitySpaces.SybaseSqlAnywhereProvider
  • EntitySpaces.VistaDB4Provider
  • EntitySpaces.VistaDBProvider

The EntitySpaces core libraries running with the SqlClientProvider provider are passing almost all unit tests (the ones failing we expect to fail). All providers of course will be run through the entire suite of unit tests. The EntitySpaces code generation project files are now “path relative”. We need to convert the Compact Framework providers over and create the new SQLite provider as well (We already have the metadata for SQLite and can generate fine against SQLite). We also need to make sure ES2009 and ES2010 can run side by side.

Finally, we are switching installers, most likely we will be using the Tarma installer.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, February 14, 2010 10:18:17 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, January 23, 2010

First, before we begin this blog post we wanted to let you know that we have re-enabled the commenting feature on our blog. Secondly, EntitySpaces 2009 already supports these SQL Server2008 data types but it returns them as type “string”. EntitySpaces 2010 allows you to handle them natively.

EntitySpaces has very powerful provider independence support so we have to be careful when implementing “extended” types for a given database engine. For instance, our NUnit test suite is a single binary that runs against all of our supported databases. The only thing we change when targeting a different database engine is the connection string, we don’t have to recompile or regenerate the code for each database because the databases all have essentially the same schema. So the question is, how do we handle non standard types offered by various database vendors? By non standard types we mean types that do not map to a .NET System Type such as System.Int32. We have the solution all worked out and EntitySpaces 2010 will allow us to support non-standard types offered by various database vendors. For instance, Microsoft SQL Server 2008 supports these types which require a separate assembly to work with.

Native SQL Type

.NET Type

geography SqlGeography
geometry SqlGeometry
hierarchyid SqlHierarchyId


The .NET types such as SqlGeography are contained in the Microsoft.SqlServer.Type assembly. Obviously we cannot link this library into or core EntitySpaces assemblies as this would require all EntitySpaces customers to have this assembly present even if they were only using Oracle. The good news is we have a solution for this. Here are the language mappings from the ES2010 esLanguages.xml file for the new SQL Server 2008 data types (currently, in ES2009 these map to type “string”, but now we map them to the real extended type).

<Type From="geography" To="SqlGeography" NonSystemType="true"/>
<Type From="geometry" To="SqlGeometry" NonSystemType="true"/>
<Type From="hierarchyid" To="SqlHierarchyId" NonSystemType="true"/>       

Notice that these are marked as NonSystemTypes = “true”, that is to say they cannot be mapped to a standard .NET type such as a “System.Int32” and so on …

During the code generation process we use this flag to generate the properties using the GetSystemObject/SetSystemObject methods as shown below.

virtual public SqlGeography TheGeography
{
    get
    {
        return (SqlGeography)base.GetSystemObject(MasterTypesMetadata.ColumnNames.TheGeography);
    }
    set
    {
        if(base.SetSystemObject(MasterTypesMetadata.ColumnNames.TheGeography, value));
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(MasterTypesMetadata.PropertyNames.TheGeography));
            }
        }
    }
}   

Notice how we simply use GetSystemObject/SetSystemObject and then cast to the specific type. This is done in your generated classes and not in our core assemblies. The property shown below is a standard column that maps to a system type (an integer column) and thus uses GetSystemInt32/SetSystemInt32 and requires no cast.

virtual public System.Int32? TheInt
{
    get
    {
        return base.GetSystemInt32(MasterTypesMetadata.ColumnNames.TheInt);
    }
    set
    {
        if(base.SetSystemInt32(MasterTypesMetadata.ColumnNames.TheInt, value))
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(MasterTypesMetadata.PropertyNames.TheInt));
            }
        }
    }
}   

Since we cannot have a GetSystemSqlGeometry() in our core assemblies without linking to special database provider assembly this works out nicely. It doesn’t effect non Microsoft folks at all.

An Example

Take a look at this rather sophisticated example. Here we create a complex shape and store it to the database. We have created a table in SQL Server 2008 called “MasterTypes” that we are using for testing all possible types.

SqlGeometryBuilder gb = new SqlGeometryBuilder();

// Set the Spatial Reference ID to 1
gb.SetSrid(1);
// Start the collection
gb.BeginGeometry(OpenGisGeometryType.MultiPolygon);
// Start the first element in this collection
gb.BeginGeometry(OpenGisGeometryType.Polygon);
// Define the first element (figure)
gb.BeginFigure(-77.054700,38.872957);
gb.AddLine(-77.057962, 38.872620);
gb.AddLine(-77.058547, 38.870079);
gb.AddLine(-77.055592, 38.868840);
gb.AddLine(-77.053217, 38.870656);
gb.AddLine(-77.054700, 38.872957);
// End the first element (figure)
gb.EndFigure();
// Define the second figure
gb.BeginFigure(-77.056972, 38.870639);
gb.AddLine(-77.055851, 38.870219);
gb.AddLine(-77.054875, 38.870864);
gb.AddLine(-77.055452, 38.871804);
gb.AddLine(-77.056784, 38.871655);
gb.AddLine(-77.056972, 38.870639);
gb.EndFigure();
// End the first polygon
gb.EndGeometry();

// Define the second polygon
gb.BeginGeometry(OpenGisGeometryType.Polygon);
gb.BeginFigure(-77.056408, 38.875290);
gb.AddLine(-77.056947, 38.875224);
gb.AddLine(-77.057466, 38.873598);
gb.AddLine(-77.057273, 38.872737);
gb.AddLine(-77.055335, 38.873020);
gb.AddLine(-77.055499, 38.874058);
gb.AddLine(-77.056408, 38.875290);
gb.EndFigure();
gb.EndGeometry();
// End (close) the collection

gb.EndGeometry();

MasterTypes m = new MasterTypes();
m.TheGeometry = gb.ConstructedGeometry;
m.Save();

This code works prefectly and saves complex shape to the database. Of course, you can read it back and access the "TheGeometry” property (we named the database column ‘TheGeometry’).

The screen shot below is what it looks like in the debugger when we inspect our “TheGeometry” property after reading it back from the database.

TheGeometry

One thing we have decided on is whether we should always make these extended types as nullable types, the answer will probably be yes.

We are also looking at supporting the SqlFileStream functionality but that is a little more complex. This approach should allow us to support non-standard data types for other database systems as well.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, January 23, 2010 11:21:00 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, January 11, 2010
video

In this video we take a quick look at enhancements to Extended Properties (custom properties you add manually to your entities) and the ability to Clone both collections and single entities. The clones are shallow clones, that is to say, they do not clone the entire hierarchical model.

To watch the video click HERE or on the image on the left …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, January 11, 2010 7:45:46 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, January 03, 2010
video

Click the link above to watch the video …

This is another quick progress video on EntitySpaces 2010. In this video we show off our esEntityCollectionView<> class which in ES2009 relied on ADO.NET DataViews. However, these are now entirely our own creation and far superior. Remember, we do not use ADO.NET under the hood anymore (see Part I here if you missed it). However, our data providers which read and write to the database of course.

Also, we show off some very cool new debugging features that will really help you when debugging your EntitySpaces applications. And finally, with the use of implicit type casting operators, working with the proxy stub classes has become basically, well, transparent.

For instance, this is now possible … (and more)

public EmployeesCollectionProxyStub GetEmployees(string serializedQuery)
{
    EmployeesCollection coll = new EmployeesCollection ();
    coll.LoadAll();

    return coll;  // But where's the creation of the proxy stub collection?
}

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, January 03, 2010 8:16:37 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, December 26, 2009

videoWe are furiously working on our ES2010 Prototype which is quickly turning into the “real deal”. The first thing we wanted to address was performance and have squeezed out a ton more horsepower, the performance is excellent. Secondly, we wanted to enhance our collections by implementing IList<T> which we have done. There is no longer a need to convert our collection classes to List<T> collections to gain access to it’s powerful API. Our collections and List<T> are essentially one and the same.

This means you have a whole new set of functionality at your disposal (using the newer .NET syntax) on our collections, including filtering, which is shown in the (hastily put together) video, you can view the video by clicking on the image on the left.

Here’s the way you can filter a collection in ES2010. The “coll” variable is an EntitySpaces collection object.

coll.Filter = coll.AsQueryable().Where(d => d.FirstName.EndsWith("2")).OrderByDescending(d => d.FirstName); 

In this case we are filtering an EntitiySpaces collection so that it only shows only FirstName’s that end with the number “2” and we also sort them in descending order by FirstName as well.

You can also now perform operations like this (shown below) on your collections, granted this example doesn’t make much sense but it does show the functionality.

int? max = coll.Max(ent => ent.EmployeeID); // Find the highest EmployeeID

We are working very hard and preserving the API too. One of the main changes is that we now no longer use DataTables/DataRows under the hood as a storage mechanism, however you really shouldn’t notice that. Our Custom Property support will now be attribute based and extremely simple to use. Serialization is going to even better (and it’s already fantastic in ES2009). Binary serialization will now be tiny now that we no longer use DataTable’s and we will be adding full JSON serialization support as well. There is just so much more to come and we can’t wait to show you more.

Forgive this hastily put together video, we will be doing a series of these video’s so keep your eyes on the blog.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, December 26, 2009 8:15:59 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, December 12, 2009

This is our final release for ES2009, the version number is 2009.2.1214.0. The Developer version and Source Version are available now. The trial version is now available as well. Watch for an announcement on our twitter account if you are waiting on the new Trial version.

Release Notes:

  • The DynamicQuery API “Between” bug has been fixed.
  • The VB.NET Hierarchical Model Equals vs IsNot bug has been fixed.
  • All SQL CE providers now correctly support the SQL TOP syntax.
  • There was a bug that would sometimes occur in the Microsoft SQL Contains clause. This has been fixed.
  • We tweaked the IDataErorrInfo so that it shouldn’t matter if column names or property names are passed in.
  • Modified SqlClientProvider.Shared.BuildDynamicInsertCommand to ignore modifications to dis-allowed columns, such as Computed, Concurrency, and AutoIncrement.
  • Added a mapping entry for the Microsoft SQL HierarchyId data type.
  • Added an overload for SetColumn() which should be used when setting the values of virtual properties that exist in the underlying DataTable. The usage is covered in this blog post. We plan to make big improvements our virtual column handling in ES2010. The signature is as follows, you pass in true as the last parameter for virtual properties.

          public void SetColumn(string columnName, object Value, bool isVirtualColumn)
  • Greatly improved our Schema/Catalog handling in the DynamicQuery API making cross schema/catalog joins much better now.
  • During an insert all columns that are either computed or that have defaults are now returned (currently only implemented for Microsoft SQL Server). We will revisit this for all providers in ES2010.
  • Greatly improved the power of the ON clause of a JOIN statement. The ON clause can now fully parse anything that can be used in a Where clause. This means the full Where syntax can now be used in the ON clause of a JOIN statement. This is true for all providers accept for Microsoft Access which requires extra parenthesis be paced around each join condition. We will revisit this functionality for MS Access in ES2010.
  • Due to our relocation to a new dedicated hosting server some of our links on the Windows “EntitySpaces 2009” menu were no longer valid. This was also true for “Forums” link on the “Whats New” tab, these have been fixed.
  • Added WithNoLock support. This is currently support for Microsoft SQL Server only (Locking hints are vastly different on all database systems).

    OrderQuery oq = new OrderQuery("o");
    OrderItemQuery oiq = new OrderItemQuery("oi");

    oq.Select(oq.CustID, oq.OrderDate, "<sub.OrderTotal>");
    oq.From
        (
            oiq.Select(oiq.OrderID,
                (oiq.UnitPrice * oiq.Quantity).Sum().As("OrderTotal"))
                .GroupBy(oiq.OrderID)
        ).As("sub");
    oq.InnerJoin(oq).On(oq.OrderID == oiq.OrderID);

    OrderCollection collection = new OrderCollection();
    oq.es.WithNoLock = true; // <== NEW
    collection.Load(oq);

    Notice that even though many query objects are being used you only need to set WithNoLock to true for the parent or main query object. The SQL generated is as follows:

    SELECT o.[CustID],o.[OrderDate],sub.OrderTotal 
    FROM
    (
       SELECT oi.[OrderID],SUM((oi.[UnitPrice]*oi.[Quantity])) AS 'OrderTotal' 
       FROM [OrderItem] oi WITH (NOLOCK)
       GROUP BY oi.[OrderID]
    ) AS sub
    INNER JOIN [Order] o WITH (NOLOCK)
    ON o.[OrderID] = sub.[OrderID]
     

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, December 12, 2009 2:47:24 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, December 06, 2009

This question has been brought up recently so we created a sample to demonstrate how this can be accomplished. When we refer to Virtual Properties we mean properties that you manually add to your Custom classes (as opposed those that are created from your database schema during code generation and wind up in your generated classes). In this example we are going to create two Virtual Properties, one that is backed by a private string variable and the other backed by a column in the underlying DataTable.

Adding the Virtual Properties to the Custom Class (Your Main Entity)

Notice the two properties MyCustomProperty and MyCustomPropertyFullName

namespace BusinessObjects
{
    public partial class Employees : esEmployees
    {
        // Virtual Property backed by a private string
        public string MyCustomProperty
        {
            get { return myCustomProperty; }
            set { myCustomProperty = value; }
        }
        private string myCustomProperty;

        // Virtual Property backed by a Column in the underlying DataTable
        public string MyCustomPropertyFullName
        {
            get { return this.GetSystemString("FullName"); }
            set { this.SetColumn("FullName", value, true); } // New Method
        }

        // Makes sure these properties show up when binding ...
        protected override List<esPropertyDescriptor> GetLocalBindingProperties()
        {
            List<esPropertyDescriptor> props = new List<esPropertyDescriptor>();

            props.Add(new esPropertyDescriptor(this, "MyCustomProperty", typeof(string)));
            props.Add(new esPropertyDescriptor(this, "MyCustomPropertyFullName", typeof(string)));

            return props;
        }

        // We need to do this for the deserialization process (more on this later)
        public override void AddNew()
        {

            // only needed if for the DataTable backed column
            base.AddNew();

            if (!this.Table.Columns.Contains("FullName"))
            {
                this.Table.Columns.Add("FullName", typeof(System.String));
            }
        }

    }
}

Typically, you don’t allow users edit virtual properties. In this example we are allowing it and this is the reason we needed to override AddNew. The reason we need to do this is that when we deserialize from the client back to the server you do not get to create the EmployeesCollection, instead the deserialization process does this. So, we overload AddNew() to make sure our underlying DataTable contains the DataColumn to hold our “FullName” value coming back from the client side. In ES2010 we are going to take a hard look at this and make this area easier. With all of the new emphasis on Silverlight 4.0 we want to make sure our proxies and serialization logic are the best and easiest they can be. However, if you are not going to allow users to edit “Virtual Properties” on the client there is no need to override AddNew.

The above code in “red” is new and will be the next maintenance release. The allows you to set virtual columns in the DataTable and not have them marked as dirty which causes the provider to try to save it. However, you can do this now without the new method though the code for that is not shown here.

Adding the Virtual Properties to the Proxies

The Server Side Proxy Class

When we generated the server and client proxies we made sure to check the “CompactXml” checkbox. This makes the XML sent over the wire much more compact. Our “Compact Xml” names each field a0, a1, a2 and so on (in the XML only). This makes the XML so much smaller than using the actual property names. However, it doesn’t effect your property names whatsoever, you still always work with your nice names in code. We recommend that you start your Virtual Properties at “a1000” and then you will never get into to trouble, that is, unless you have 1000 columns in your table in which case you probably have bigger problems.

Our server side and client side proxies are partial classes, so you can easily add more properties to them. Below is the server proxy partial class that we created to house our two addition properties. This ensures that you never hand edit the generated proxies.

namespace BusinessObjects
{
    public partial class EmployeesProxyStub
    {
        [DataMember(Name = "a1000", Order = 1000, EmitDefaultValue = false)]
        public System.String MyCustomProperty
        {
            get
            {
                return this.Entity.MyCustomProperty;
            }
            set { this.Entity.MyCustomProperty = value; }
        }

        [DataMember(Name = "a1001", Order = 1001, EmitDefaultValue = false)]
        public System.String MyCustomPropertyFullName
        {
            get
            {
                return this.Entity.MyCustomPropertyFullName;
            }
            set { this.Entity.MyCustomPropertyFullName = value; }
        }
    }
}

The Client Side Proxy Class

If you are deserializing from the server side proxies into the client side proxies you want to use the same signature for the the properties in the client side proxy.

namespace Proxies
{
    public partial class EmployeesProxyStub
    {
        [DataMember(Name = "a1000", Order = 1000, EmitDefaultValue = false)]
        public System.String MyCustomProperty
        {
            get
            {
                return _myCustomProperty;
            }
            set
            {
                this.SetDirty();
                this._myCustomProperty = value;
                this.RaisePropertyChanged("MyCustomProperty");
            }
        }
        private System.String _myCustomProperty;

        [DataMember(Name = "a1001", Order = 1001, EmitDefaultValue = false)]
        public System.String MyCustomPropertyFullName
        {
            get
            {
                return _myCustomPropertyFullName;
            }
            set
            {
                this.SetDirty();
                this._myCustomPropertyFullName = value;
                this.RaisePropertyChanged("MyCustomPropertyFullName");
            }
        }
        private System.String _myCustomPropertyFullName;
    }
}

One Minor Gotcha

The way our logic is setup the esRowState property of the proxies must be the last property serialized because it determines the row state. Therefore, what we did for this example was to hand edit both the generated proxies (server and client) and change the esRowState to the name and order of 10,000 to make sure it’s last. Here are the hand edits …

[DataMember(Name = "a10000", Order = 10000)]
public string esRowState
{
    get { return this._esRowState; }
    set { this._esRowState = value; }
}

However, we have already made changes in our template(s) so that our next maintenance release (due out very soon) will always set the esRowState to the name and order of 10,000. If you want to make these hand edits to your templates you can do so very easily and simply regenerate. You would need to do this in both proxy templates if you are using both the server and client proxies.

BEFORE

<%if(WcfSupport){%>[DataMember(Name="<%=CompactXML ? "a" + compactXmlIndex++.ToString() : "esRowState"%>"<%if(WcfOrder){%>, Order=<%=(++lastOrdinal).ToString()%><%}%>)]<%}%>
public string esRowState
{
    get { return TheRowState;  }
    set { TheRowState = value; }
}<%}%>

 

AFTER

<%if(WcfSupport){%>[DataMember(Name="<%=CompactXML ? "a10000" : "esRowState"%>"<%if(WcfOrder){%>, Order=10000<%}%>)]<%}%>
public string esRowState
{
    get { return TheRowState;  }
    set { TheRowState = value; }
}<%}%>

 

Finally, the test, does it work?

First, this code is for demonstration purposes only. You never have to use our esDataContractSerializer manually, in fact, you should not be using it unless you absolutely have to. Instead, just pass our proxies to and from your WCF methods as normal parameters and the serialization will happen normally. However, the code below uses our esDataContractSerializer so you can try this in your own code quickly without having to build the services and test it all. In this example we serialize from the server proxies (found in your generated classes) to the client side proxies and back again. If you were using the server proxies on both sides of the conversation you wouldn’t need to generate or mess with the client side proxies of course.

It’s fun to run the code below and look at the XML that is sent back and forth.

private void button1_Click(object sender, EventArgs e)
{
    try
    {
        EmployeesCollection coll = new EmployeesCollection();
        EmployeesQuery q = new EmployeesQuery("e");

        q.SelectAllExcept(q.Notes, q.Photo); // We want all columns but the Notes and Photo
        q.Select((q.LastName + ", " + q.FirstName).As("FullName"));  // Fills our DataTable backed property
        q.es.Top = 3;

        if (coll.Load(q))
        {

            // Change our string back properties
            foreach (Employees emp in coll)
            {
                emp.MyCustomProperty = "Test";
            }

            // Create Our Proxy Stubb
            BusinessObjects.EmployeesCollectionProxyStub server = new BusinessObjects.EmployeesCollectionProxyStub(coll, false);

            // Serialize it into a string and return this string to Silverlight
            string xml = esDataContractSerializer.ToXml(server);

            using (StreamWriter sw = File.CreateText("C:\\query.xml"))
            {
                sw.Write(xml);
                sw.Flush();
                sw.Close();
            }

            // Deserialize the string above into our Client side proxy
            Proxies.EmployeesCollectionProxyStub client = esDataContractSerializer.FromXml(xml, typeof(Proxies.EmployeesCollectionProxyStub))
                as Proxies.EmployeesCollectionProxyStub;

            // Set a property and notice that esRowState goes to Modified
            client.Collection[0].LastName = "CrazyDude";
            client.Collection[0].MyCustomProperty = "MyCustomProperty";
            client.Collection[0].MyCustomPropertyFullName = "Griffin, Mike";

            // Serialize our client side proxy into xml and send it to the server
            xml = esDataContractSerializer.ToXml(client);

            // Deserialize it on the server, the esRowState is modifed as we would expect
            BusinessObjects.EmployeesCollectionProxyStub server1 =
                esDataContractSerializer.FromXml(xml, typeof(BusinessObjects.EmployeesCollectionProxyStub))
                as BusinessObjects.EmployeesCollectionProxyStub;

            // Now save the Entity
            server1.GetCollection().Save();
        }
    }
    catch (Exception ex)
    {

    }
}

The XML

Notice that our two custom properties are at a1000, and a1001 and we have changed esRowState to be a10000.

<EmployeesCollection xmlns="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Collection>
        <Employees>
          <a0>1</a0>
          <a1>CrazyDude</a1>
          <a2>AAAA</a2>
          <a3>Sales Representative</a3>
          <a4>Ms.</a4>
          <a5>1948-12-08T00:00:00</a5>
          <a6>1992-05-01T00:00:00</a6>
          <a8>Seattle</a8>
          <a9>WA</a9>
          <a10>78890</a10>
          <a11>USAa</a11>
          <a12>(206) 555-9857</a12>
          <a13>5467</a13>
          <a16>70272</a16>
          <a17>http://accweb/emmployees/davolio.bmp</a17>
          <a1000>Test</a1000>
          <a1001>CrazyDude, AAAA</a1001>
          <a10000>Unchanged</a10000>

        </Employees>
        <Employees>
          <a0>2</a0>
          <a1>Fuller</a1>
          <a2>tttt</a2>
          <a3>Vice President, Sales</a3>
          <a4>Ms.</a4>
          <a5>1953-02-19T00:00:00</a5>
          <a6>1992-08-14T00:08:00</a6>
          <a7>908 W. Capital Way</a7>
          <a8>Tacoma</a8>
          <a9>WA</a9>
          <a10>98401</a10>
          <a11>USA</a11>
          <a12>(206) 555-9482</a12>
          <a13>3457</a13>
          <a16>99</a16>
          <a17>http://accweb/emmployees/fuller.bmp</a17>
          <a1000>Test</a1000>
          <a1001>Fuller, tttt</a1001>
          <a10000>Unchanged</a10000>

        </Employees>
        <Employees>
          <a0>3</a0>
          <a1>Spaces</a1>
          <a2>tttt</a2>
          <a3>Sales Representative</a3>
          <a4>Ms.</a4>
          <a5>1963-08-30T00:00:00</a5>
          <a6>1992-04-01T00:00:00</a6>
          <a7>722 Moss Bay Blvd.</a7>
          <a8>Kirkland</a8>
          <a9>WA</a9>
          <a10>98032</a10>
          <a11>USA</a11>
          <a12>(206) 555-3412</a12>
          <a13>3355</a13>
          <a16>2</a16>
          <a17>http://accweb/emmployees/leverling.bmp</a17>
          <a1000>Test</a1000>
          <a1001>Spaces, tttt</a1001>
          <a10000>Unchanged</a10000>

        </Employees>
    </Collection>
</EmployeesCollection>

Summary

This was an extremely valuable exercise for us and revealed a few shortcomings when it comes to serialization virtual properties. Is is possible to implement your code without the new method in red above but that code is not shown here. We are hoping most of you desiring this functionality will be upgrading to our upcoming maintenance release. Also, remember, you can generate entities from views and in views you can create columns that are virtual and not based on database columns at all. This would make a lot of the above work a mute exercise with the caveat that views cannot be saved (easily) back to the database.

Our proxies are very important to future of EntitySpaces and they even run down inside the browser along with our DynamicQueries inside of Silverlight (under the browser) and we will be stepping back to see how we can make them far more powerful and easy to expand in ES2010. However, our next maintenance release will certainly make the above code a no brainer.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, December 06, 2009 2:53:37 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, November 25, 2009

Last night we moved our site(s) over to dedicated hosting, there are a few kinds, very, very minor. We are working through those, but overall, things went incredibly well. The system is incredibly responsive. One of the main things you will see is that we are moving away from the Community Server forums and will be using the integrated DotNetNuke forums. The old forums are still available but will be made read only at some point in the near future. Click on the Forums link on our main menu to get to the new forums. There is an announcement post there.

Expect a more extensive blog post later on tonight …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, November 25, 2009 7:55:15 AM (Eastern Standard Time, UTC-05:00)  #   
 Monday, October 26, 2009

This is a quick post to explain how to use the new built in EntitySpaces Concurrency Mechanism. Basically, all that is required is that you add an integer type column to your table. In the table below I have added a column named “MyTimestamp” which is of type “int”. All we need to do now is drill down to this column on the EntitySpaces “Metadata” Tab and indicate that we want to use this as our concurrency column.

thetable 

This is very easy, and if you’re on our Q3 release there are no more name/value pairs, you simply enter user metadata choices directly in the property grid.

image

Notice here I have set the IsEntitySpacesConcurrency flag to true. Now all I have to do is click the little Save icon and regenerate my “Generated” class.

The path to the Metadata file can be found on the “Settings” tab in the “File Locations” section. See the “User Metadata” path. The resulting xml for the simple entry above is as follows.

<esUserData Version="2009.2.1012.0">
  <Drivers>
    <Driver Name="SQL">
      <Databases>
        <Database Name="MyDatabase">
          <Tables>
            <Table Name="MyTable">
              <Columns>
                <Column Name="MyTimestamp" IsEntitySpacesConcurrency="True" />
              </Columns>
            </Table>
          </Tables>
        </Database>
      </Databases>
    </Driver>
  </Drivers>
</esUserData>

This technique can be used on all non-compact framework databases ..

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, October 26, 2009 9:02:13 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, October 04, 2009

VistaDB 4.0 Support

We have made a new version of the EntitySpaces Developer available (2009.2.1005.0) that supports VistaDB 4.0. The official release of VistaDB 4.0 was just made available and within 24 hours of it’s release we have added support for it. The EntitySpaces Developer version is available but we haven’t updated the Trial version yet. That will happen within the next 24 hours or so. You can install this right over the top of the 2009.2.0928.0 release, just make sure you have Visual Studio closed. There are now two choices on the Settings tab when connecting to VistaDB.

  1. VistaDB   = VistaDB 3.x
  2. VistaDB4 = VsitaDB 4.x

Also, there is a new EntitySpaces DataProvider that is used with VistaDB 4.x. The assembly name is EntitySpaces.VistaDB4Provider.dll. In your config file in the EntitySpaces connection information you use “EntitySpaces.VistaDB4Provider” as the provider. There are no VistaDB 4.0 compact framework providers as VistaDB 4.0 does not currently ship a Compact Framework assembly.

Fixed the “||” Issue

There was an issue with the || (or) symbol. This has been fixed. In C# you should always be able to use && for AND and || for OR. Of course, in VB.NET you just use the OR and AND keywords.

VB.NET Nullable Type Query Issue

There was an issue that was causing VB.NET developers to use .Value when used nullable types in DynamicQuery statements. This has been fixed.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, October 04, 2009 6:20:05 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, September 27, 2009
kick it on DotNetKicks.com Shout it

We are pleased to make our Official EntitySpaces Q3 Release available. Both the Developer and Source code are available for download to current customers and the Trial version is the official ES2009 Q3 production release as well. The version number is 2009.2.0928.0. We recommend you download ES2009 Q3 saving it to disk and then install via the Start menu’s “Run As …” command and run as “Admin”. This is necessary for Windows Vista and Windows 7.

NOTE: You must regenerate your “Generated” classes and your stored procedures, if using stored procedures.

The EntitySpaces 2009 Q3 release has some of the best support for Silverlight and WCF that any ORM has to offer. Our smart proxies are very powerful and make working with WCF services and Silverlight a breeze. See the PDF’s in our Silverlight and WCF demos. Also, our DynamicQuery API is much more powerful in this release. Here is a quick list of features, fixes, and enhancements that are in this release.

The release notes can be found in this PDF file. There are some breaking changes with our 0209 Production Release which is unusual for us, however, they are pretty minor.

  • Sybase SQL Anywhere Support Including the Compact Framework
  • Excellent Silverlight and WCF Support
  • 64 bit runtime assemblies are included
  • A New EntitySpaces.DynamicQuery Assembly which is Silverlight Compliant
  • A New EntitySpaces Generic Concurrency Mechanism for all databases
  • DynamicQuery - The Having Clause is Now Supported
  • DynamicQuery - Full Expressions in OrderBy and GroupBy
  • DynamicQuery - Daisy Chaining Syntax has been fixed
  • DynamicQuery - Supports “Raw SQL” Everywhere
  • DynamicQuery - Sub Operator Ordering Fix
  • DynamicQuery - Order of Values More Flexible
  • DynamicQuery – Serializable in XML (very tiny packets)
  • DynamicQuery – Parse() method allows you to get the SQL without executing the statement
  • Major Proxy Stub Enhancements (WCF/WebServices/Silverlight) and Compact XML Mode
  • Enhanced UserData.xml file (support for multi dabase developers)
  • Editing User Metadata Easier through the .NET Property Grid
  • Connection Configuration Information Enhancements (no longer read only, catalog/schema added)
  • VistaDB and Microsoft SQL CE Password Bug Fixes
  • Microsoft SQL CE “TOP” syntax fixed
  • There is now a Twitter toolbar button on the “Whats New” tab
  • In the Settings “Other” tab you can control what double-click means for a template.
  • In the Settings “Other” tab you can turn off the DateTime stamp in the header.
  • Brand new Silverlight and WCF Demos
  • We are now bound to VistaDB 3.4.1.84

Of course, there are many other internal changes not listed in the above list.

One thing we didn’t get completed is “path relative project files”. We know this is a very important feature however it turned out be be more complicated than we first thought. However, this will be a high priority for 2010. Also, the Trial version comes with the source code to our Sybase plugin for our code generation engine which will allow you to easily switch Sybase versions. The ES2009 Q3 Developer does not have the Sybase source in it, we will make it available via a separate download.

We will be doing a series of blog posts highlighting a lot of these new features so stay tuned.

 

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight/WCF application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, September 27, 2009 9:32:03 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, September 24, 2009

We have posted a pre-release build of the 2009.2.0928.0 release. We really need your help, it's for customers only, you'll find it under our Products => Download menu on our main site

  • You should close Visual Studio
  • Uninstall your previous ES2009 release
  • Install the new “Test” release
  • Regenerate your "Generated" classes and stored procedures (if you're using stored procedures)

Please report in on this thread and let us know if you were able to test and what database you are using. The more non-Microsoft SQL users the better. We will be publishing the official release Sunday night. We know this is a lot to ask but we really would like some extra testing before the official release.

- The EntitySpaces Team

posted on Thursday, September 24, 2009 9:18:23 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, September 07, 2009

Better Naming Logic

This is a non-breaking change and won’t effect your current codebase. Take a look at this SQL table, notice that the table name and column names are full of funky characters and such …

CREATE TABLE [dbo].[Crazy Names # 123 !(*]
(
    [PrimaryKey#] [int] IDENTITY(1,1) NOT NULL,
    [ Field With Spaces ] [nchar](10) NULL,
    [123FieldStartingWithANumber] [nchar](10) NULL,
    [Field with % Special # Characters , In It) ] [nchar](10) NULL,
    [A Field] [nchar](10) NULL,
    [A_Field] [nchar](10) NULL,
    [StandardFieldName] [nchar](10) NULL,
    [_wow_this_is_crazy.man ok] [nchar](10) NULL,
    [this#dba##should###be####fired#####.ok] [nchar](10) NULL,
    [_ALIAS_ME_#$%] [nchar](10) NULL,
)

This is what the resulting class looks like (in the past, we didn’t handle these so well)

[Serializable]
abstract public class esCrazyNames123 : esEntity
{
    public System.Int32? PrimaryKey;
    public System.String FieldWithSpaces;
    public System.String _123FieldStartingWithANumber;
    public System.String FieldWithSpecialCharactersInIt;
    public System.String AField;
    public System.String A_Field;
    public System.String StandardFieldName;
    public System.String _Wow_This_Is_CrazyManOk;
    public System.String ThisDbaShouldBeFiredOk;
    public System.String MyAlias;
}

You may have noticed the last field “MyAlias” is different. That is because we Aliased it to ensure Aliasing still works. Aliasing is done via the Metadata tabl. You might also notice that “underscores” were left in the column names. However, this is not the default. We merely check the “Preserve Underscores” checkbox because of the “A Field” and A_Field” columns so they wouldn’t conflict. “Preserve Underscores” if off by default. Take a look at this screen shot.

image

Notice on the “Naming Conventions” tab we have “Preserve Underscores” checked. Also, you might notice the “Trimlist” field is completely gone, it is not used anymore. But don’t worry, these changes will not effect your current objects.

Here are the rules basically for Property names in .NET


if(Char.IsLetterOrDigit(character))
{
    // this character is valid
}

The only exception to this rule is you can have an “_” underscores and the 1st character cannot be a number. That’s it. So now, no matter how things are created in your database EntitySpaces will always generate valid classes that compile out of the box, no need for aliasing unless you want to.

 

DynamicQuery Parse() Method

You can now capture the SQL Syntax a DynamicQuery would generate without having to execute it. This is done via the Parse() method like so:

CrazyNames123 c = new CrazyNames123();
c.Query.es.Top = 1;
c.Query.Where(c.Query.MyAlias == "asdf");
string str = c.Query.Parse();

This can come in handy when writing your queries …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, September 07, 2009 9:29:09 AM (Eastern Standard Time, UTC-05:00)  #   
 Monday, August 31, 2009
kick it on DotNetKicks.com   Shout it

We are pleased to make our ES2009 Q3 Beta available as our Trial version. In fact, this is our only Trial version as we want folks new to EntitySpaces to begin with this version. The production release is scheduled for September 28th, 2009. This trial includes data providers for all of our supported databases. We have listened to your feedback and hopefully have implemented a lot of the requests you have asked for. We will still sneak in some more items from the Q3 Wish List forum before the official release so if you see something we overlooked that you feel is very important let us know on the forums. We really need some our customers to upgrade if you can, if you do, please post on the forums and let us know what things you ran into it that weren’t in our release notes and we will update those quickly.

The EntitySpaces 2009 Q3 release we feel has some of the best support for Silverlight that any ORM has to offer. Our smart proxies are very powerful and make working with WCF services and Silverlight a breeze. Also, our DynamicQuery API is much more powerful in this release. Here is a quick list of features, fixes, and enhancements that are in this release.

The release notes can be found in this PDF file. Although there are some breaking changes with our 0209 Production Release no new breaking changes will be implemented between the Beta and Production release.

  • Sybase SQL Anywhere Support Including the Compact Framework
  • Excellent Silverlight Support
  • A New EntitySpaces.DynamicQuery Assembly which is Silverlight Compliant
  • A New EntitySpaces Generic Concurrency Mechanism
  • DynamicQuery - The Having Clause is Now Supported
  • DynamicQuery - Full Expressions in OrderBy and GroupBy
  • DynamicQuery - Daisy Chaining Syntax has been fixed
  • DynamicQuery - Supports “Raw SQL” Everywhere
  • DynamicQuery - Sub Operator Ordering Fix
  • DynamicQuery - Order of Values More Flexible
  • DynamicQuery – Serializable in XML (very tiny packets)
  • Major Proxy Stub Enhancements (WCF/WebServices/Silverlight) and Compact XML Mode
  • Enhanced UserData.xml file (support for multi dabase developers)
  • Editing User Metadata Easier Through the .NET Property Grid
  • Connection Configuration Information Enhancements (no longer read only, catalog/schema added)
  • VistaDB Password Bug Fix
  • Microsoft SQL CE “TOP” syntax fixed
  • There is now a Twitter toolbar button on the “Whats New” tab
  • In the Settings “Other” tab you can control what double-click means for a template.
  • In the Settings “Other” tab you can turn off the DateTime stamp in the header.

Of course, there are many other internal changes not listed in the above list. One thing we didn’t get completed but will before the official release is path relative project files, we know this is a very important feature. Also, our WCF demo is not included. We are reworking it for the official release, but all other demo’s are included.

Download the Trial Version HERE.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

 

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, August 31, 2009 10:20:21 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, August 30, 2009

We are pleased to make this beta available. This beta includes data providers for all of our supported databases. The Trial Version of the Beta is not yet available. It will be available Monday night/Tuesday morning. We are only planning on having this one beta with the official release being published on September 28th, 2009. We have listened to your feedback and hopefully have implemented a lot of the requests you have asked for. We will still sneak in some more items from the Q3 Wish List forum before the official release so if you see something we overlooked that you feel is very important let us know on the forums. We really need some our customers to upgrade if you can, if you do, please post on the forums and let us know what things you ran into it that weren’t in our release notes and we will update those quickly.

The EntitySpaces 2009 Q3 release we feel has some of the best support for Silverlight that any ORM has to offer. Our smart proxies are very powerful and make working with WCF services and Silverlight a breeze. Also, our DynamicQuery API is much more powerful in this release. Here is a quick list of features, fixes, and enhancements that are in this release.

The release notes can be found in this PDF file. Although there are some breaking changes no new breaking changes will be implemented between the Beta and Production release.

  • Sybase SQL Anywhere Support Including the Compact Framework
  • Excellent Silverlight Support
  • A New EntitySpaces.DynamicQuery Assembly which is Silverlight Compliant
  • A New EntitySpaces Generic Concurrency Mechanism
  • DynamicQuery - The Having Clause is Now Supported
  • DynamicQuery - Full Expressions in OrderBy and GroupBy
  • DynamicQuery - Daisy Chaining Syntax has been fixed
  • DynamicQuery - Supports “Raw SQL” Everywhere
  • DynamicQuery - Sub Operator Ordering Fix
  • DynamicQuery - Order of Values More Flexible
  • DynamicQuery – Serializable in XML (very tiny packets)
  • Major Proxy Stub Enhancements (WCF/WebServices/Silverlight) and Compact XML Mode
  • Enhanced UserData.xml file (support for multi dabase developers)
  • Editing User Metadata Easier Through the .NET Property Grid
  • Connection Configuration Information Enhancements (no longer read only, catalog/schema added)
  • VistaDB Password Bug Fix
  • Microsoft SQL CE “TOP” syntax fixed
  • There is now a Twitter toolbar button on the “Whats New” tab
  • In the Settings “Other” tab you can control what double-click means for a template.
  • In the Settings “Other” tab you can turn off the DateTime stamp in the header.

Of course, there are many other internal changes not listed in the above list. One thing we didn’t get completed but will before the official release is path relative project files, we know this is a very important feature. Also, our WCF demo is not included. We are reworking it for the official release, but all other demo’s are included.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.


EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, August 30, 2009 10:33:01 PM (Eastern Standard Time, UTC-05:00)  #   
 Friday, August 28, 2009

There are some very nice connection handling enhancements that will be in this weekends ES2009 Q3 Beta. First, and we know you’ll be thrilled to hear this, all of the information regarding the connection setup, including the connection string itself, is writeable at runtime. This is true even when using a web.config or app.config file, the information is no longer readonly. It is no longer necessary to use the configless approach to be able to modify things on the fly.

Also, you can now set your “schema” and “catalog” information in the Connection Info section as shown below. This will really help out our Oracle users and of course applies to all databases that support schema and catalog information.

<add name="SQLDynamic"
   providerMetadataKey="esDefault"
   sqlAccessType="DynamicSQL"
   provider="EntitySpaces.SqlClientProvider"
   providerClass="DataProvider"
   connectionString="yada yada;"
   databaseVersion="2005"
   schema="dbo"
   catalog="Northwind"

/>

This two changes alone really add a lot of flexibility to the EntitySpaces Connection management area.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Friday, August 28, 2009 7:10:37 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, August 24, 2009

We just wanted to do a quick blog post and let everyone know that so far we are on track for the August 31st release date. We have almost finished adding the EntitySpaces universal concurrency checking code for provider independent programmers. Everything has to go through unit testing again but we’re very close now. This is a big release for us and this is going to be a very busy week for sure. Follow us on Twitter for more timely info ..

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, August 24, 2009 2:55:19 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, August 15, 2009

ORMBattle.NET is devoted to direct ORM comparison. This site is actually run by one of the ORM vendors but we still want to take our shot at it.

 

Vote Here For EntitySpaces to the Next ORM product evaluated ==> ORM BATTLE.NET

 

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, August 15, 2009 7:24:46 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, August 11, 2009

Things are going great. We now have all of our data providers upgraded and compiling clean, including the Compact Framework providers. We have many users working fine with our Sybase support so we are very pleased on how our Sybase support is being received. This is just a quick post to let you know we have added the Having clause to fill out our DynamicQuery API.

Here is a sample query (this might not make sense as a real query, this was just for testing the syntax, the query did return data however).

EmployeeQuery q = new EmployeeQuery();
q.Select(q.EmployeeID, q.Age.Sum().As("TotalAge"));
q.Where(q.EmployeeID.IsNotNull());
q.GroupBy(q.EmployeeID);
q.Having(q.Age.Sum() > 5);
q.OrderBy(q.EmployeeID.Descending);

EmployeeCollection coll = new EmployeeCollection();
if (coll.Load(q))
{

}

This resulting SQL is shown below:

SELECT [EmployeeID] AS 'EmployeeID',SUM([Age]) AS 'TotalAge'  FROM
[ForeignKeyTest].[dbo].[Employee]
WHERE[EmployeeID] IS NOT NULL
GROUP BY [EmployeeID]
HAVING SUM([Age]) > @Age2
ORDER BY [EmployeeID] DESC

Our DynamicQuery API has such terrific enhancements coming in ES2009 Q3. Also, our release dates have been posted on our Roadmap. Start making your plans today …

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

 

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, August 11, 2009 9:00:51 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, August 06, 2009

This information is on our Roadmap page which can be seen HERE.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

 

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, August 06, 2009 10:49:04 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, August 02, 2009
Shout it kick it on DotNetKicks.com

image

We are very excited to announce our Sybase SQL Anywhere support available with this release. We currently support Sybase SQL Anywhere 11 (versions 11.0.0.1490 and 11.0.1.2044). Our assemblies are bound to the 11.0.1.2044 version. However, if you are using the older 11.0.0.1490 version see this post on our forums. Swapping your SQL Anywhere provider version only takes a minute or two. We ship two providers for Sybase, a regular EntitySpaces provider for Sybase network server/personal server, and one for the Compact Framework. Both of these are available in this alpha release. EntitySpaces (the application) is available in two modes; a Visual Studio Add-In which is available from the Visual Studio “Tools” menu and the “stand alone” application available from your EntitySpaces 2009 menu after installation.

Our Sybase support in this initial release is already very rich. We support Sybase autoincrement columns, timestamps for concurrency, and both dynamic and stored procedures modes for updating your Sybase housed data. There is a new template included with this release that will generate your Sybase CRUD stored procedures if you want to use stored procedures for your CRUD operations. This isn’t required however, EntitySpaces can run with or without stored procedures. This is our first release with Sybase support so please let us know via the forums how the Sybase support is working for you. We’ve done a pretty good job of testing and will fix any bugs reported on our forums.

We already have a customer who is going to be writing a Silverlight application using EntitySpaces 2009 and Sybase, very cool stuff. Customers can find this release under our Products –> Downloads menu. The source code for customers who purchased source code should be published later on this evening and be available by Monday morning at the latest. UPDATE – 2009-08-07: We have posted a Trial version of this Alpha on our Trial Download page.

This Alpha Release only includes EntitySpaces providers for SQL Server and Sybase. The EntitySpaces 2009 Q3 enhancements will be rolled into the other providers and be available with the upcoming Beta Release. Our current Production Release (with all providers) is EntitySpaces 2009.1.0209.0. It is available to Customers on the Products Downloads page, and as a Trial version on the Trial Download page. For current customers wishing to try the EntitySpaces provider for Sybase, or want to get a jump start on the Q3 enhancements for SQL Server, be sure to read the installation instructions and release notes for the Alpha.

New EntitySpaces Users


If you are new to EntitySpaces watch our video demonstrating how easy it is to create your first EntitySpaces application and get up and running quickly. Click the video on the left to watch the video.

getstarted


Be sure and read through our Getting Started PDF file. You can click on the image to the left or click on the link on your EntitySpaces 2009 menu after installation. This document is pretty short and if you take the time to read through it you will save yourself time in the end. So take a look at this very valuable document.

Also, be sure and register on our forums. We have created two new areas specifically for our Sybase providers. If the issue you are having is specific to one of our Sybase providers, such as the incorrect SQL being generated (which isn’t very likely), post a note in the proper Sybase forum. Of course, all other “How do I ?” questions you can ask in the proper area on our forums.

Finally, on your EntitySpaces 2009 menu after installation you will see Windows.Forms, ASP.NET, and Silverlight programming samples that will compile right out of the box. They are set to run against the Microsoft SQL Northwind database. Even if that is not the database you are running they are great samples to look at. The ASP.NET samples also use our esDataSource control. So if you are looking for example code be sure and check the sample applications found in your EntitySpaces 2009 program menu entry.

Other Features

There are some other very nice features in this alpha release. Our proxies now support something we call “Compact XML” and can be used whenever you are using both our Client side and Server Side proxies together and avoiding the middle man (that is the Visual Studio Generated proxies as we do in our Silverlight demo). We have updated our online Silverlight example and it is now using our Compact XML mode. As a side note, Silverlight supports something called Binary XML serialization out of the box with only a config file change required.

There is also a new feature in the Settings Tab that lets you control what happens on a double click a template in the Template tab. You can either have the double click launch the template for editing, or for execution, or for execution with the last known settings. The EntitySpaces Universal Concurrency checking mechanism IS NOT in this release, but it will be in our upcoming beta.

Our next step is going to be to rapidly upgrade the rest of our data providers, implement our “EntitySpaces Universal Concurrency” feature for database independent concurrency handling, make our project files path relative, and squeeze in more features from our Q3 Wish List forum. Things are going to move very rapidly. After next weeks team meeting we should be able to publish the target release our first beta, including what features will be included, and finally, publish the RTW date for the official release of  EntitySpaces 2009 Q3.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

 

posted on Sunday, August 02, 2009 2:44:47 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, July 28, 2009

This little gem was brought up by one of our customers, Paul_IBSoftware, and it looked like fun to implement so we snuck it into our Q3 release. Nothing like getting a suggestion and having it in the product the same day. Basically, we had the SQL conjuctions AND and OR but we didn’t have anyway to indicate AND NOT or OR NOT but that is no longer true, see the example below.

VB.NET

Dim q As New EmployeesQuery()
q.es.Top = 1
q.Where(q.EmployeeID = 1 And Not (q.LastName = "goofy"))
q.Load()

Notice you can now use And Not/Or Not in your query syntax. This will yield the following SQL syntax.

SELECT  TOP 1 *
FROM [Employees]
WHERE ([EmployeeID] = @EmployeeID1 AND NOT [LastName] = @LastName2)

C#

You can do this in C# too, however this is one case where the VB.NET syntax reads better than the C# syntax. Take a look at the sample below.

EmployeesQuery q = new EmployeesQuery();
q.es.Top = 1;
q.Where(q.EmployeeID == 1 && ! (q.LastName == "googy"));
q.Load();

Granted, a C# developer would probably never think of that syntax, but it yields the exact same SQL as above. Probably a C# developer would write it as below

EmployeesQuery q = new EmployeesQuery();
q.es.Top = 1;
q.Where(q.EmployeeID == 1 && (q.LastName != "googy"));
q.Load();

The above query would product the following SQL.

SELECT  TOP 1 *
FROM [Employees]
WHERE ([EmployeeID] = @EmployeeID1 AND [LastName] <> @LastName2)

Summary

The EntitySpaces 2009 Q3 DynamicQuery is going to blow your socks off. We are so excited about this release, things are moving very quickly too.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, July 28, 2009 6:31:17 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, July 27, 2009
kick it on DotNetKicks.com

We have our Sybase SQL Anywhere implementation working quite well now. We are releasing a new alpha on August 3rd that will come with a new provider for Sybase SQL Anywhere including a Compact Framework provider as well for Sybase mobile development. We have been developing and testing with SQL Anywhere version 11. Everything is working great including autoincrement keys, concurrency checking, and so on. We haven't tested our stored procedures yet but should have that work completed by August 3rd. Remember Sybase fans, EntitySpaces runs under Mono as well.

Having never really used Sybase before we must say it really is a very full featured database and they have worked with us very well. We basically have a red phone we can pick up and get right to technical support, fantastic! Sybase really seems to be focused on customer service more so than most companies we’ve worked with, maybe that’s part of why Sybase has announced terrific earnings for Q2 of this year, who else can say that? We will be taking a look at supporting their Ultra Light version as well. Sybase is a very serious contender in the database world, you will be hearing more from us on this subject in the future. If you don’t know much about Sybase click on some of the links in this post, we think you will be impressed.

This should be our last Alpha version. Soon we will be upgrading all our providers to support the new features we've implemented (with some still yet to be added). We will then provide a beta release that will be made available to the general public as a trial version as we head down the home stretch for EntitySpaces 2009 Q3.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, July 27, 2009 9:43:51 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, July 21, 2009

We thought we would use this blog post to report more progress on our EntitySpaces 2009 Q3 release. However, before we continue we want to point out that our current production release is EntitySpaces Q1 2009.1.0209.0 and it is available now, it is also very stable (as usual). Okay, so here is some of the new functionality, we are working through our Q3 Wish List forum posts.

image

In the above image we have selected the EntitySpaces 2009 Metadata tab. We have highlighted two areas in the image for purposes of this post. The red box is a .NET PropertyGrid control and we use this now instead of what we used to use, which was a .NET DataGrid. Not only does it look better and allow us to group data by functionality, but it also allows for easy editing. The blue box highlights certain fields that you can edit directly in the metadata. Notice that you can edit the “Alias” directly in the Metadata. Also, there is an Exclude flag which you can set to true to indicate that you want this column skipped entirely during code generation purposes. There is also a new flag called IsUniversalConcurrency which you can set on any integer type field (I can see econner jumping for joy already!). This will allow you to have exact matching schema’s across multiple databases and still have concurrency checking. The reason this is needed is Microsoft SQL’s Timestamp for instance is not really compatible with other database systems, or said better there really is no universal concurrency checking built into dbms systems so we will provide one for you. Finally, we have IsCustomAutoKey and CustomAutoKeyText, these will replace the current way that Oracle users (and possibly others) have to provide key/value pairs in our user metadata. We will automatically convert your current UserData.xml files for you to support his new approach. All of our Metadata is now presented this way (not just column information).

What is nice about this new approach is that we can expand it easily in the future and behind the scenes any values that you edit end up in the user metadata just as it would if you were typing in key/value pairs only it’s so much easier. We are also considering making IsInPrimaryKey editable so that you can make tables without primary keys appear as though they had them.

Also, we have eliminated the problem that prevented you from daisy chaining queries when joins were involved.

We have also flushed out the DynamicQuery API such that you have no operator precedence issues, for instance.

query.Where(42 > query.Age);

or

query.Where(query.Age < 42);

The same holds true with our mathematical operators as well.

query.Select(“Wow” + query.FirstName + “Cool”); // notice the string “Wow” comes first

or

query.Select(100 * query.Age);  // Notice the 100 comes first

Progress is moving very rapidly and we are still passing at 100% in our unit tests (including a bunch of new tests that have been added).

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, July 21, 2009 6:42:50 AM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, July 16, 2009
kick it on DotNetKicks.com

We have pushed our EntitySpaces Silverlight application up so you can run it and take a look at it. We decided to compile it under the Silverlight 3 toolset so it requires Silverlight 3 to run it. We did this to make sure we are compatible. Silverlight 3 is RTM now and you can download the Visual Studio tools for it HERE but you do not need these to run the demo, just to develop Silverlight 3 applications. There is a lot of code posted in this blog post but we thought you might really want to know how this stuff works, it’s not that hard to understand if you take the time to look at the code. The online demo can be found here ==> DEMO

image

You can add rows and edit rows and then save the data. We are using the Microsoft SQL Northwind database, specifically the Employees table. When you search you can search on the first name or last name fields. The purpose of this demo is not to make a really cool Silverlight UI, but to show how easy it is to use EntitySpaces to write a Silverlight application. There is one glitch when editing data. You need to move off of the selected row for your edits to “take”. This is a Silverlight issue and not an EntitySpaces Issue. The demo is included in our current alpha, however the version shown here is fancier. (It will be in the next release as shown above).

The EntitySpaces Silverlight Demo uses our EntitySpaces proxies on both sides of the conversation. The client side proxies run under Silverlight and our server side proxies run on the server. The Silverlight application hits our WCF service to fetch the data.

The WCF Service

This is what the WCF Service looks like including the Interface. The Interface for the service is shown below. Notice we are returning and taking the EntitySpaces Proxy Stub classes as parameters. However, we pass the EntitySpaces DynamicQuery to the server in string form. The EntitySpaces DynamicQuery is now fully functional under Silverlight and requires only a single 49k assembly which will automatically download with your Siverlight application.

using System.ServiceModel;
 
using BusinessObjects;
 
namespace EntitySpaces.SilverlightApplication.Web
{
    [ServiceContract]
    public interface INorthwind
    {
        [OperationContract]
        EmployeesCollectionProxyStub GetEmployees(string employeesQuery);
 
        [OperationContract]
        EmployeesCollectionProxyStub SaveEmployees(EmployeesCollectionProxyStub collection);
    }
}
 
The implementation class is shown below. Notice in GetEmployees() we deserialize the incoming query (passed as a string) with a single one-line call into a full server side query that we can execute. We then use that query to load our collection, and finally wrap it with a proxy collection and return it. The Save() method is ridiculously simple and powerful. Notice that we merely access the incoming proxies “Collection” property (which is a full EmployeesCollection class) and call save on it. Then we simply return the very same proxy that was sent to us as the incoming parameter. Try clicking the Add button in our demo a few times and then press the Save button. Notice the auto identity columns are immediately reflected in the grid. These are returned automatically via our save method. This is an incredibly powerful and easy way to create Silverlight applications. The row state, including added, modified, and deleted, are automatically maintained for you. All you have to do is call save.
 
using System;
using System.Collections.Generic;
using System.ServiceModel.Activation;
 
using BusinessObjects;
 
namespace EntitySpaces.SilverlightApplication.Web
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Northwind : INorthwind
    {
        #region INorthwind Members
 
        public EmployeesCollectionProxyStub GetEmployees(string serializedQuery)
        {
            List<Type> types = new List<Type>();
            types.Add(typeof(EmployeesQuery));
 
            EmployeesQuery employeesQuery = EmployeesQuery.SerializeHelper.FromXml(
                serializedQuery, typeof(EmployeesQuery), types) as EmployeesQuery;
 
            EmployeesCollection employeesCollection = new EmployeesCollection();
            if (employeesCollection.Load(employeesQuery))
            {
                EmployeesCollectionProxyStub proxy = new EmployeesCollectionProxyStub(employeesCollection);
                return proxy;
            }
 
            return null;
        }
 
        public EmployeesCollectionProxyStub SaveEmployees(EmployeesCollectionProxyStub collection)
        {
            if (collection != null)
            {
                collection.GetCollection().Save();
                return collection;
            }
 
            return null;
        }
 
        #endregion
    }
}


The Silverlight Page

Our Page.xaml file looks like this. A lot of this is just noise like setting up the buttons and such. The part you are interested in is the <data:DataGrid.Columns> section where we manually setup the columns we want to display in the grid. We could have used AutoGenerateColumns=“True” however. For the two date columns we use a DataGridTemplateColumn in order to hookup the fancy date editing control. We also set the EmployeeID column to read only so that users cannot edit the primary key.

<UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="EntitySpaces.SilverlightApplication.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
    <Grid Background="Black" >
 
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
 
        <Grid Grid.Row="0" Margin="7">
 
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="300"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="240"></ColumnDefinition>
                <ColumnDefinition Width="75"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            
            <HyperlinkButton Grid.Column="0" NavigateUri="http://www.entityspaces.net" TargetName="New"><Image Source="EntitySpaces_Logo.jpg" Grid.Column="0" /></HyperlinkButton>
            <TextBlock Name="SearchTextBlock" Grid.Column ="1" Text="EntitySpaces 2009 Silverlight Demo" Foreground="Yellow" FontSize="14" Margin="10,5,10,5" VerticalAlignment="Center"></TextBlock>
            <ProgressBar Name="WorkingBar" Grid.Column="2" Foreground="Yellow" Background="Black" Value="0" Maximum="100" Margin="2,2,2,2" />
            <TextBox Name="SearchTextBox" Text="Enter Criteria Here" Grid.Column="3" Margin="20,0,20,0" Padding="10,5,10,5" FontSize="14" GotFocus="SearchTextBox_GotFocus"></TextBox>
            <Button Name="SearchButton" Content="Search" Grid.Column="4" FontSize="14" Click="SearchButton_Click"></Button>
        </Grid>
 
 
 
        <Grid Grid.Row="1" Margin="7">
            <data:DataGrid Name="EmployeesDataGrid" AutoGenerateColumns="False" >
 
                <data:DataGrid.Columns>
 
                    <data:DataGridTextColumn Binding="{Binding EmployeeID}" Header="Employee ID" IsReadOnly="True" />
                    <data:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name" />
                    <data:DataGridTextColumn Binding="{Binding LastName}" Header="Last Name" />
                    <data:DataGridTextColumn Binding="{Binding HomePhone}" Header="Home Phone" />
                    <data:DataGridTextColumn Binding="{Binding City}" Header="City" />
 
                    <data:DataGridTemplateColumn Header="Hire Date" Width="160">
                        <data:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding HireDate, Mode=OneWay, Converter={StaticResource ShortDateConverter}}" VerticalAlignment="Center" Margin="2"/>
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellTemplate>
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <controls:DatePicker SelectedDate="{Binding HireDate, Mode=TwoWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
 
 
                    <data:DataGridTemplateColumn Header="Birth Date" Width="160">
                        <data:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding BirthDate, Mode=OneWay, Converter={StaticResource ShortDateConverter}}" VerticalAlignment="Center" Margin="2"/>
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellTemplate>
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <controls:DatePicker SelectedDate="{Binding BirthDate, Mode=TwoWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
 
                </data:DataGrid.Columns>
 
            </data:DataGrid>
        </Grid>
 
        <Grid Grid.Row="2" Margin="7">
 
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="75"></ColumnDefinition>
                <ColumnDefinition Width="15"></ColumnDefinition>
                <ColumnDefinition Width="75"></ColumnDefinition>
                <ColumnDefinition Width="15"></ColumnDefinition>
                <ColumnDefinition Width="75"></ColumnDefinition>
            </Grid.ColumnDefinitions>
 
            <Button Name="AddButton" Content="Add" Grid.Row="2" Grid.Column="1" FontSize="14" Click="AddButton_Click" ></Button>
            <Button Name="SaveButton" Content="Save" Grid.Row="2" Grid.Column="3" FontSize="14" Click="SaveButton_Click" ></Button>
            <Button Name="ClearButton" Content="Clear" Grid.Row="2" Grid.Column="5" FontSize="14" Click="ClearButton_Click" ></Button>
        </Grid>
 
    </Grid>
</UserControl>

 

Our Page.xaml.cs file is shown below. Take a look at the SearchButton_Click event. We build the EntitySpaces DynamicQuery and call the service.GetEmployeesAsync() method passing in the query in string form. In the service_GetEmployeesCompleted() method we access our EmployeesCollectionProxyStub class which was returned to us in the “e.Result” variable. However, now we are working with the client side lightweight proxy class. The interesting thing about this approach is that we are NOT using the Visual Studio generated proxies. Our proxies are smart and maintain row state, and they are going to get even smarter. This approach makes EntitySpaces a terrific architecture for building your Silverlight applications. The SaveButton_Click is also incredibly simple. The timer stuff you see is just to make the fancy progress bar work in the demo.

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;
 
using EntitySpaces.SilverlightApplication.NorthwindClient;
using Proxies;
 
 
namespace EntitySpaces.SilverlightApplication
{
    public partial class Page : UserControl
    {
        private NorthwindClient.NorthwindClient service = new NorthwindClient.NorthwindClient();
        private Proxies.EmployeesCollectionProxyStub employees;
        private Storyboard Timer = new Storyboard();
        private int RecordsAdded;
 
 
        public Page()
        {
            InitializeComponent();
            Timer.Completed += new EventHandler(Timer_Completed);
            Timer.Duration = TimeSpan.FromMilliseconds(2);
        }
 
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Proxies.EmployeesQueryProxyStub q = new Proxies.EmployeesQueryProxyStub("emp");
 
                q.Select(q.EmployeeID, q.FirstName, q.LastName, q.HomePhone, q.HireDate, q.BirthDate, q.City);
                q.Where(
                    q.FirstName.Like("%" + SearchTextBox.Text + "%") |
                    q.LastName.Like("%" + SearchTextBox.Text + "%"));
                q.OrderBy(q.LastName.Ascending);
 
                service.GetEmployeesCompleted += new EventHandler<GetEmployeesCompletedEventArgs>(service_GetEmployeesCompleted);
                service.GetEmployeesAsync(Proxies.EmployeesQueryProxyStub.SerializeHelper.ToXml(q));
 
                WorkingBar.Value = 0;
                Timer.Begin();
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.StackTrace);
            }
        }
 
        void service_GetEmployeesCompleted(object sender, GetEmployeesCompletedEventArgs e)
        {
            WorkingBar.Value = 100;
            Timer.Stop();
            
            if (e.Result != null)
            {
                employees = e.Result;
                EmployeesDataGrid.ItemsSource = employees.Collection;
            }
        }
 
        private void ClearButton_Click(object sender, RoutedEventArgs e)
        {
            SearchTextBox.Text = "";
            employees = null;
            EmployeesDataGrid.ItemsSource = null;
        }
 
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (employees == null) return;
 
                WorkingBar.Value = 0;
                Timer.Begin();
 
                service.SaveEmployeesCompleted += new EventHandler<SaveEmployeesCompletedEventArgs>(service_SaveEmployeesCompleted);
                service.SaveEmployeesAsync(employees);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.StackTrace);
            }
        }
 
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            if (employees == null)
            {
                employees = new EmployeesCollectionProxyStub();
                EmployeesDataGrid.ItemsSource = employees.Collection;
            }
 
            if (RecordsAdded++ < 5)
            {
                EmployeesProxyStub newEmp = new EmployeesProxyStub();
                newEmp.FirstName = "Scott";
                newEmp.LastName = "Schecter";
 
                employees.Collection.Add(newEmp);
            }
        }
 
        void service_SaveEmployeesCompleted(object sender, SaveEmployeesCompletedEventArgs e)
        {
            try
            {
                WorkingBar.Value = 100;
                Timer.Stop();
 
                RecordsAdded = 0;
 
                employees = e.Result;
                EmployeesDataGrid.ItemsSource = employees.Collection;
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.StackTrace);
            }
        }
 
        private void SearchTextBox_GotFocus(object sender, RoutedEventArgs e)
        {
            if (SearchTextBox.Text == "Enter Criteria Here")
            {
                SearchTextBox.Text = "";
            }
        }
 
        void Timer_Completed(object sender, EventArgs e)
        {
            WorkingBar.Value++;
            Timer.Begin();
 
            if (WorkingBar.Value > 100)
            {
                WorkingBar.Value = 1;
            }
        }
    }
}

Rather than repeat of bunch of content from previous posts, here are two posts that will help you further understand how we created the entire solution.

1) How we generated the lightweight client side proxies.

2) How we built the application and informed Visual Studio to use our proxies rather than generate proxies for us.

Be sure when you execute the “Generated Master” template to check the “Serializable Queries” checkbox on the advanced tab. Again, the demo is included in the latest alpha. We are even adding a new checkbox that will “scrunch” the XML when it goes over the wire so that your packets are much smaller. The XML will send all of your fields as “a1”, “a2”, “a3” and so on rather than “EmployeeID”, “FirstName”, “LastName”. This will make a big difference when sending large chunks of data from client to server and back again. Of course, we only send the columns that actually have data (non null/default) so your XML will be very tiny. This will not impact your proxies, they of course will still have your nice property names.

Well, that’s it for now. We are not only working on Silverlight and Proxies, we are also working through the Q3 Wish List as well.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, July 16, 2009 10:42:46 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, July 12, 2009

The Developer version and Source version have been published for this release. You must uninstall any prior versions of EntitySpaces 2009 including the production release or any prior alphas. EDIT – 2009-08-07: This Alpha only supports the EntitySpaces provider for SQL Server.

These are new features contained in this release:

  • The EntitySpaces Hierarchical Object Model Improvements
  • The EntitySpaces 2009 Getting Started PDF is now on the EntitySpaces 2009 menu after installation.
  • You can turn off the DateTime value in your class headers so that they wont cause differences in your source control system (in the settings tab).
  • Major Improvements to our lightweight client side proxies.
  • Our Silverlight demo which demonstrates using our proxies on both sides of the Silverlight / WCF conversation complete with editing and saving data through a grid. We will be posting the demo online so you can execute it and play with it. You will find it on our Samples menu after install it will compile right out of the box, just see the Readme.txt file in the solution.

Lightweight Client Side Proxy Stub – Major Improvements

The lightweight client side proxies now support

  • The INotifyPropertyChanged interface
  • ObservableCollections (great for Silverlight support)
  • And a Silverlight checkbox will we remove any non supported items such as [Serialized] attributes

image

We used the settings above settings to create the client side proxies for our Silverlight demo. Below is what our proxy collection looks like.

image

Noitce the Collection property is an ObservableCollection. In our Silverlight demo you can add records directly to your collection and they will automatically show up in the grid.

image

Above is our single Entity object. It implements the INotifyPropertyChanged interface. You can change a property directly on your Entity object it will immediately be reflected in the Silverlight grid.

We are adding a lot of enhancements to our lightweight client side proxies. You can begin your Silverlight application starting with this Alpha, it is working very well. A few things will be adding are a compressed mode where we will “Scrunch” the XML being sent over the wire by giving your property names in XML like “a1, a2, a3, a4, a5 …” and so on to reduce the size of the XML packet. This isn’t really an EntitySpaces issues its just the result of XML itself which is pretty bulky and will not effect your code in any way.

We will be hosting our new EntitySpaces Silverlight demo on our site and providing some insight on how it all operates. It is very simple to create Silverlight applications with EntitySpaces 2009 and the full demo is including with this latest alpha. The demo runs against Microsoft SQL’s Northwind database.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, July 12, 2009 2:46:59 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, July 11, 2009

The “Selected Tables Only” checkbox

We have implemented a long standing request that provides you with more control over how your hierarchical object model is created. Now you can limit your hierarchical object model to include only those tables that you have selected at code generation time. When EntitySpaces creates your hierarchical object model it does so using your foreign keys in your database to determine the relationships. Let’s take a look at how this new “Selected Tables Only” checkbox logic works.

image image

Notice above that we have checked the “Selected Tables Only” checkbox and that we have only two tables selected (the “Employees” and the “Orders” table). When EntitySpaces generates the code it will generate the Employees and Orders classes as usual. However, since we have checked the “Selected Tables Only” checkbox only the hierarchical properties involving the Orders and Employees table will be added as hierarchical properties. Let’s take a look at the Employees class (below) generated with the above settings and see what it looks like.

image

Notice the Employees class contains only the self referencing ReportsTo properties and the OrdersCollectionByEmployeeID property. This is because only these two tables were selected and of course we checked the “Selected Tables Only” checkbox.

image

The Orders class above contains only the Employee hierarchical property for the same reason.

Without the “Selected Tables Only” checkbox

Finally, let’s regenerate with the “Selected Tables Only” un-checkbox and show you what the difference would be. When you leave the “Selected Tables Only” checkbox un-checked the hierarchical object model will include all of the related objects regardless of what tables you have selected (this is currently how it works).

image

The Orders table hierarchical properties would be as follows.

image

This feature is already implemented and will be included in our next release and is one of the items requested in our Q3 Wish list forum. This can come in real handy when your database contains many tables and you only want a subset of them in your hierarchical object model. This can also be very useful in DotNetNuke development if you wanted to include the users and roles tables only for instance and not have to include all of the other tables they reference (due to the hierarchical properties). We are working through the Q3 Wish list and implementing the requests quite rapidly.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, July 11, 2009 7:51:01 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, July 09, 2009
image

When we moved from ES2008 to ES2009 we didn’t update our Getting Started PDF, however, that has now been rectified. This document can be of great help to those just downloading EntitySpaces or even those who have been customers for some time and want to know more about all of the options on the Advanced Tabs for instance. This document is up-to-date with our current Alpha as well. The Getting Started PDF is available on our home page under the “Documentation” menu and will be included in all future releases and available under your “EntitySpaces 2009” menu after installation.

You can download and view the documentation by clicking on the link below.
http://www.entityspaces.net/documentation/GetStarted.pdf

Of course as always your feedback is welcome.


From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Silverlight application, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, July 09, 2009 10:49:27 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, July 08, 2009
kick it on DotNetKicks.com

Okay, we finally got it!! We can honestly say getting a grip on Silverlight has been a real learning curve for our team, but it’s going to be a breeze for EntitySpaces customers because we’ve done all the research and laid all of the track. Our first approach was to use strings for everything because we didn’t want to use the “brain dead” proxies created by Visual Studio when you add a service reference to a Silverlight project. Then we figured out how we could force Visual Studio to use our client side proxies when adding a service reference. This is truly awesome. I cannot imagine a better way to write Silverlight applications than with EntitySpaces. What we are about to show you is so easy it will floor you. We will also be making a video on this and making our demo available with a future alpha or beta version. Okay, enough hype, show us already !!

image

Above, is our Silverlight Solution that contains everything needed to run the entire demo. Notice first, that we have all of the EntitySpaces runtime projects included rather than just references to the dlls (EntitySpace.Core35, etc.). We do this as we develop so we can debug and fix things if need be. Naturally, these project references are not required in your solution. You only need to add the runtime dll references to the project which houses your WCF service, EntitySpaces.SilverlightApplication.Web in this case.

Also notice the first project in the red box, EntitySpaces.Proxies.Silverlight. This is simply a Silverlight class library that we added to our solution. Then we generated our client side proxies into that solution. So now we have our client side proxies housed in a Silverlight class library. We could have just added these to our SilverlightApplication but there is a very important reason we didn’t. More on this later. These are generated via our Client Side Proxy Stub Template.

Next we have the SilverlightApplication project itself. This is the Silverlight application that runs in the browser. It references our EntitySpaces.Proxies.Silverlight class library that houses our client side proxies, and it references the EntitySpaces.DynamicQuery.Silverlight assembly because we want to be able to run full “es” DynamicQueries under Silverlight. Of course this project also contains our Page.xaml.cs file which contains our code that executes everything under Silverlight, we’ll be looking at that in a moment.

Finally, we have our EntitySpaces.SilverlightApplication.Web project which houses our WCF service in a web application. The two important files we’ll be looking at here are the INorthwind.cs file and the Northwind.svc.cs file.

Let’s start with the WCF Service

image

We have two methods. GetEmployees takes a serialized query in string form (the only time we have to use strings is with a query) and returns the data through our server side proxy class “EmployeesCollectionProxyStub”. Our Save method takes and returns a server side “EmployeesCollectionProxyStub” as well. The server side proxy stubs are generated via the Generated Master template. You indicate that you want them created via the Proxy/Stub tab as shown below. Also, be sure and check the “Serializable Queries” checkbox on the advanced tab.

image 

 

You can see how simple our WCF Service is in this example. Let’s look at the Northwind.svc.cs file.

image

First, look at the second method, our SaveEmployees() method. Could this be any easier? Not only do you not have to worry about which rows are added, modified, or deleted, but you can simply call Save, and return the very same collection. All new records, including their identity columns and such, will be returned to the Silverlight application so it can update it’s grid (in our case).

The GetEmployees method is a little more complicated, but not by much. It merely deserializes the string (a serialized proxy query) into a full blown EmployeesQuery, asks the EmployeesCollection to load it, then creates an EmployeesCollectionProxyStub class, passing in the EmployeesCollection, and returns it. Pretty simple really.

The Silverlight Application Logic

Let’s take a look at what our Silverlight Application looks like.

image

What the demo application does is create an EntitySpaces DynamicQuery when the user clicks on the Search button, calls our WCF service method GetEmployees(), then populates the grid with the data. The user can edit the data in the grid, and then merely click the Save button, which calls the WCF service method SaveEmployees(). Again, pretty simple.

So let’s look at our page.xaml.cs file. (We’ve removed any error handling to make the screen shot smaller.)

image

Notice in SearchButton_Click we create a EmployeesQueryProxyStub and use it exactly as we do with our full server side DynamicQuery objects, only we cannot load it directly. It must be serialized and sent to the server. In the last line of that method, we call our WCF service method GetEmployees().

In service_GetEmployeesCompleted() we assign e.Result to “employees”, which is our client side EmployeesCollectionProxyStub object, then we bind to employees.Collection, and our grid is populated.

Now, in the save button click event we intentionally set the first rows’ name to “GoogyGaga”, then add an additional Employee just for kicks, and call our WCF service method SaveEmployees(), which returns a refreshed collection, which we again assign to “employees”, and rebind the grid.

That’s it folks. An entire Silverlight application using EntitySpaces, showing both sides of the conversation. EntitiySpaces not only provides the glue between Silverlight and WCF, but it also provides all of the database access as well. All generated in mere seconds from your database schema via our Visual Studio Add in. Does it get any better than this?

Making Visual Studio Use the EntitySpaces Proxies instead of Visual Studio Generated Proxies

This is very cool indeed. We do not want to use Visual Studio generated proxy classes because they do not maintain row state for us (and other things). Our client side proxies maintain what rows are modified, added, and deleted such that you can send the entire collection back to the server and simply call Save() on it and bingo, it’s in the database. Here’s the trick. Remember the EntitySpaces.Proxies.Silverlight class library that houses our client side proxies? Well, there’s a reason we needed to have it housed in it’s own Silverlight class library and that is so we could tell Visual Studio to use it rather than generate proxies for us. Here’s how you do that when adding your Service Reference to the Silverlight application.

image

This is how we add our reference above. However, the trick to forcing Visual Studio to use our client side proxies is performed by pressing the “Advanced …” button.

image

Notice here that we tell it to reuse the types in our EntitySpaces.Proxies.Silverlight assembly. This is totally awesome. It’s great that Visual Studio allows us to do this. But even better, we were somewhat ahead of our time. Our client side proxies easily serialize into our server side proxies and vise versa. This is exactly what the DataContractSerializer is all about. It allows you to have different classes on each side of the conversation, and it works wonderfully in EntitySpaces.

Summary

This may seem like a lot to soak in but it really isn’t. We’ll be shipping our Silverlight demo hopefully with our next Alpha. Writing Silverlight applications is so graceful using EntitySpaces. Sure, you’re going to need to learn XAML and other things but all of the plumbing, wiring, and track have been laid for you. EntitySpaces has terrific Silverlight support. Everything you see here in this blog post works in our current alpha version. It’s late and we need to get some sleep, we are really jazzed about this and if anything we are understating how fantastic EntitySpaces is at providing the glue between Silverlight and WCF.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, July 07, 2009 11:43:13 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, July 05, 2009

kick it on DotNetKicks.com

[UPDATED – SEE EntitySpaces, Silverlight, and WCF a Fantastic Combination FOR OUR NEW AND FAR SUPERIOR APPROACH]

Besides the enhancements mentioned in the DynamicQuery Enhancements post, this release addresses some important issues discovered in our previous alpha concerning Silverlight and WCF. You should uninstall the prior alpha before upgrading. Our Silverlight assembly is now named EntitySpaces.DynamicQuery.Silverlight.dll. There is, also, a new class called esDataContractSerializer (available in the .NET 3.5 assemblies) that can be used in any WCF or Silverlight application. Take a look at the code sample below which demonstrates an entire conversation from Server to Client and back to the Server again.  Using this approach all of your methods would use strings to send data to and receive data from the server. Of course, you can use the auto generated proxy classes created by Visual Studio but the nice thing about this approach is that the row-state of all of the data is maintained automatically and then saving becomes trivial.

public void TestCollection()
{
    EmployeesCollection coll = new EmployeesCollection();
    coll.Query.SelectAllExcept(coll.Query.Photo);
    coll.Query.es.Top = 3;

    if (coll.Query.Load())
    {
        // Create Our Server Side Proxy Stub
        BusinessObjects.EmployeesCollectionProxyStub server = new BusinessObjects.EmployeesCollectionProxyStub(coll);

        // Serialize it into a XML string and return this string to our Silverlight or WCF Client
        string xml = esDataContractSerializer.ToXml(server);

        // Deserialize the string above into our Client Side Proxy under Silverlight or our WCF Client
        Proxies.EmployeesCollectionProxyStub client = esDataContractSerializer.FromXml(xml, typeof(Proxies.EmployeesCollectionProxyStub))
            as Proxies.EmployeesCollectionProxyStub;

        // Set a property and notice that esRowState goes to Modified
        client.Collection[0].LastName = "Squarepants";

        // Serialize our Client Side Proxy into xml and send it back to the server
        xml = esDataContractSerializer.ToXml(client);

        // Deserialize it on the server back into a Server Side Proxy Stub, the esRowState is modifed as we would expect
        BusinessObjects.EmployeesCollectionProxyStub server1 = esDataContractSerializer.FromXml(xml, typeof(BusinessObjects.EmployeesCollectionProxyStub))
            as BusinessObjects.EmployeesCollectionProxyStub;

        // Now save the Entity
        server1.GetCollection().Save();
    }
}

You can also use this same approach with the single entity based proxies. For example, the EmployeeProxyStub class.

Some Silverlight / WCF Code

The PopulateEmployees() method below is the method that populates the grid in our soon to be released Silverlight demo. The method executes under Silverlight after the user types in his search criteria and hit’s the Search button. Notice that the query classes (both proxy and full server) contain their own ToXml / FromXml methods. This is because when we serialize and deserialize queries we are doing so for complex object graphs with circular references. This is more complex than what our esDataContractSerializer class is designed for.

private void PopulateEmployees()
{
    try
    {
        NorthwindClient.NorthwindClient service = new NorthwindClient.NorthwindClient();

        Proxies.EmployeesQueryProxyStub q = new Proxies.EmployeesQueryProxyStub("emp");
        q.Select(q.EmployeeID, q.FirstName, q.LastName, q.Title, q.HomePhone, q.HireDate, q.BirthDate);
        q.Where( q.FirstName.Like("%" + SearchTextBox.Text + "%") | q.LastName.Like("%" + SearchTextBox.Text + "%"));
        q.OrderBy(q.LastName.Ascending);
        q.es.Top = 5;

        // Notice we send the XML representation of the Query to the Server via the Async call “GetEmployees”
        service.GetEmployeesCompleted += GetEmployeesCompleted;
        service.GetEmployeesAsync(Proxies.EmployeesQueryProxyStub.SerializeHelper.ToXml(q));
    }
    catch (Exception exc)
    {
        Console.WriteLine(exc.StackTrace);
    }
}

The above code has called GetEmployees (a WCF service method on the server). This is what our WCF Service method on the server that receives the query looks like.

public string GetEmployees(string serializedQuery)
{
    List<Type> types = new List<Type>();
    types.Add(typeof(EmployeesQuery));

    // Deserialize our EmployeesQueryProxyStub class into our full blown server side query so we can execute it
    EmployeesQuery employeesQuery = EmployeesQuery.SerializeHelper.FromXml(
        serializedQuery, typeof(EmployeesQuery), types) as EmployeesQuery;

    EmployeesCollection employeesCollection = new EmployeesCollection();
    if (employeesCollection.Load(employeesQuery))
    {
        // Okay, we have loaded it, lets send the results back in string form
        EmployeesCollectionProxyStub proxy = new EmployeesCollectionProxyStub(employeesCollection);
        return esDataContractSerializer.ToXml(proxy);
    }

    return null;
}

Back under Silverlight in the browser our async GetEmployeesCompleted method is called, and we bind the data to the grid.

void GetEmployeesCompleted(object sender, GetEmployeesCompletedEventArgs e)
{
    try
    {
        WaitText.Visibility = Visibility.Collapsed;

        string serializedEmployees = e.Result;

        // Turn the XML into a Proxies.EmployeesCollectionProxyStub collection
        Proxies.EmployeesCollectionProxyStub employees = esDataContractSerializer.FromXml(
            serializedEmployees, typeof(Proxies.EmployeesCollectionProxyStub)) as Proxies.EmployeesCollectionProxyStub;

        // Now Databind
        EmployeesDataGrid.ItemsSource = employees.Collection;
    }
    catch (Exception exc)
    {
        Console.WriteLine(exc.StackTrace);
    }
}

This approach offers some real advantages. You can later send the serialized collection back to the server with added, updated, and deleted rows. Once on the server, deserialize it, and simply call Save on the full server side collection. This is because our proxies maintain the rowstate for you. We are still working out the kinks as we build our Silverlight application. The one problem we have right now is the Silverlight grid seems to revert back to the original data and lose our cell edits. However, this happens with the Visual Studio proxies as well. Once we get this issue resolved and are fully saving data, we will publish our Silverlight demo. If you want to use this technique, you will need to generate the client side proxies and include them in your Silverlight or WCF client application. Be sure and click the new checkbox named “Serializable Queries” on the Advanced Tab of the Generated Master template. However, as you can see from the DynamicQuery Enhancements post, we are doing more than just addressing Silverlight and WCF development.

The bug that was affecting project files has been fixed. This occurred if you edited a template instance in an existing project, and saved without visiting all of the tabs. With this fix, un-visited tabs no longer revert to their default values. There is also a Twitter toolbar button on the What’s New page so you can easily get to our Twitter page. This alpha still only supports Microsoft SQL Server.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, July 05, 2009 10:49:49 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, July 04, 2009

We have greatly improved the power of our DynamicQuery API, and there is still much more coming before our next official release goes into production. This is just a quick blog post to show some of the upcoming enhancements.

Full Expressions in OrderBy and GroupBy

This query doesn’t really make sense, but we wanted to show you what will be possible in the next release.

EmployeesQuery q = new EmployeesQuery();
q.Select(q.LastName.Substring(2, 4).ToLower());
q.OrderBy(q.LastName.Substring(2, 4).ToLower().Descending);
q.GroupBy(q.LastName.Substring(2, 4).ToLower());

EmployeesCollection coll = new EmployeesCollection();
if (coll.Load(q))
{
   string s = q.es.LastQuery;
}

The SQL Generated is as follows (and works)


SELECT SUBSTRING(LOWER([LastName]),2,4) AS 'LastName'
FROM [Employees]
GROUP BY SUBSTRING(LOWER([LastName]),2,4)
ORDER BY SUBSTRING(LOWER([LastName]),2,4) DESC

In the current production release 2009.1.0209.0, you can only use a “Column Name” in the OrderBy and GroupBy statements. In the upcoming release, you will be able use full expressions, just as you can now do in the Select statement.

Raw SQL Injection Everywhere

There may be times when you need to access some SQL feature that is not supported by our DynamicQuery API. But, now having used and fallen in love with DynamicQuery, the last thing you want to do is stop and go write a stored procedure or create a view. We have always supported the raw injection feature in our Select statement, but it will soon be available almost everywhere. The way it works is you pass in raw SQL in the form of a string surrounded by < > angle brackets. That indicates to the EntitySpaces dataproviders that you want the raw SQL passed directly to the database engine “as is”.

Here is an example query. You would never write a query like this in reality. EntitySpaces supports this simple query without having to use < > angle brackets. This is just to show all of the places that can accept the raw SQL injection technique:

EmployeesQuery q = new EmployeesQuery();
q.Select("<FirstName>", q.HireDate);
q.Where("<EmployeeID = 1>");
q.GroupBy("<FirstName>", q.HireDate);
q.OrderBy("<FirstName ASC>"); 

EmployeesCollection coll = new EmployeesCollection();
if (coll.Load(q))
{
    string s = q.es.LastQuery;
}

The SQL Generated is as follows (and works)

SELECT FirstName,[HireDate] AS 'HireDate' 
FROM [Employees] WHERE (EmployeeID = 1)
GROUP BY FirstName,[HireDate]
ORDER BY FirstName ASC

Of course, you could easily write the above query without injection, but you get the idea. The escape hatch will be available to you almost everywhere ….

EmployeesQuery q = new EmployeesQuery();
q.Select(q.FirstName);
q.Where(q.EmployeeID == 1);
q.OrderBy(q.FirstName.Ascending);
q.GroupBy(q.FirstName, q.HireDate);

Using the raw SQL injection techniques above will allow you to invoke SQL functions that we don’t support, including database vender specific SQL, and so on. Hopefully, you will almost never have to resort to writing a custom load method to invoke a stored procedure or an entirely hand written SQL statement. Of course, you can use our native API everywhere and just inject the raw SQL on the GroupBy for instance. You can mix and match to get the desired SQL.

There’s much more to come in this release …  Just last night we were serializing DynamicQuery’s from a Silverlight application and sending them to a WCF server to fetch the data… very slick. Watch for an upcoming blog post on our Silverlight demo very soon.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, July 04, 2009 11:06:11 AM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, June 16, 2009

This stuff is hot guys and gals. We are asking Jon Davis to write an entirely new Silverlight demo that will showcase our DynamicQuery feature running under Silverlight inside the browser and hitting a WCF service on the server. We cannot wait, this is so slick … Here’s another sneak peak post.

First the Client Code

Notice here we are using new “QueryProxyStub” classes that are available in through our proxy template (in addition to the existing single object and collection).

Proxies.OrdersQueryProxyStub o = new Proxies.OrdersQueryProxyStub("o");
Proxies.EmployeesQueryProxyStub q = new Proxies.EmployeesQueryProxyStub("emp");
q.Select(q.LastName.ToLower().Substring(2, 4), o.Freight, (q.FirstName + "," + q.Address).As("Mike"));
q.LeftJoin(o).On(q.EmployeeID == o.EmployeeID);
q.Where(q.EmployeeID > 30);
q.es.Top = 50;

// Manually convert it (you won’t need to do this)
string xml = q.Serializer.ToXml();

Their is a new property on the Query called Serializer than can help with certain serialization issues, for the most part however you shouldn’t have to use it. But it’s nice to have around, above we serialize our query to XML via the WCF DataContractSerializer (the entire object graph) via the ToXml() method.

 

Now the Server Code Deserializing (Simulated)

Notice below that we deserialize the XML from our QueryProxyStub classes into our full blown server side Query classes so that we can execute them. In reality the code that you will write on the server will be much simpler than the code shown below. You will use the KnownTypeAttribute on your WCF Service methods. We will have a full sample showing how this works, don’t let the code below scare you, it’s so easy. This is just test harness code but it works just fine.

using (MemoryStream memoryStream = new MemoryStream(Encoding.Unicode.GetBytes(xml)))
{
    using (XmlDictionaryReader reader =
        XmlDictionaryReader.CreateTextReader(memoryStream, Encoding.Unicode,
        new XmlDictionaryReaderQuotas(), null))
    {
        types = new List<Type>();
        types.Add(typeof(EmployeesQuery));
        types.Add(typeof(OrdersQuery));

        EmployeesQuery emp = new EmployeesQuery();
        DataContractSerializer dcs = emp.Serializer.GetSerializer(types);

        // Deserialize
        emp = dcs.ReadObject(reader) as EmployeesQuery;

        EmployeesCollection coll1 = new EmployeesCollection();
        if (coll1.Load(emp))
        {
            // It worked
        }
    }
}

At this point we could return the newly loaded collection back to the client and it would implicitly be returned as a ProxyCollection.

The Demo

We hope to have an entirely new Silverlight / WCF Demo available to coincide with and built from the upcoming Alpha release. Of course will we do a blog post on that as well. When you see it in action you will be amazed how easy it is. We still have a few issues to work out but things are moving very rapidly now. Imagine having what appears to be the full EntitySpaces API available to you on a client somewhere and only needing to have a single 52k assembly present, and it is fully Silverlight compliant as well. This is just one thing our upcoming release will provide.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, June 16, 2009 10:40:36 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, March 01, 2009
kick it on DotNetKicks.com     Shout it

Can you Query me now?mobile (Silverlight, WCF, Webservices, and Mobile)

EntitySpaces 2009 Q2 is going to revolutionize your ability to use the EntitySpaces 2009 architecture on the client side of any two-way conversation, whether it be a Silverlight, WCF, or a webservices conversation. In fact, you will be able to work on the client side as if the full EntitySpaces architecture was at your disposal but without actually requiring the EntitySpaces architecture be present on the client. "But how can that be?" you wonder. Continue reading and we will explain.

EntitySpaces has always had good support for mobile applications via our Compact Framework support. We even generate "smarter" proxies than the ones generated by Visual Studio for WCF or webservices scenarios. Our proxies maintain row state such as (inserted, updated, and deleted) such that all that is required is that you send the data back to the server and commit it.  But this client side proxy support is about to become much, much more powerful and can be used for non-mobile scenarios such as Silverlight, WCF, and webservices. With our enhanced proxies (especially for mobile applications where space is limited) this can prove to be a very powerful way to use EntitySpaces. We like to think of this as a sort of "Virtual EntitySpaces Mode" as it feels just like EntitySpaces only it really doesn't require the full architecture on the client side. So, let's dive into this and see how it works starting with a review of our current proxy support.
 

Our Current Client Side Proxy Functionality

The EntitySpaces Client Side proxies offer the ability to easily work with EntitySpaces on the client side of a two way conversation without requiring any of the EntitySpaces assemblies. Our proxies also track the dirty state for you so that when you send data back to the server EntitySpaces automatically knows whether to insert, update, or delete the data. This functionality is already built into the currently shipping ES2009 Q1 release. The template that you use to create the Client Side proxies is highlighted below.

ProxyStubTemplate

When you execute the "Client Side Proxy/Stub" template there are currently two classes generated for you, the Collection and Entity class. Shown below are the proxy stub classes that were generated by the "Client Side Proxy/Stub" template for the Microsoft Northwind Suppliers table. Notice that the classes do not inherit from any base classes nor do they require any of the EntitySpaces assemblies. Also, in the SuppliersProxyStub (entity) class notice the esRowState property. This is the property that EntitySpaces uses to determine the state of the entity (inserted, updated, or deleted) and the proxy is smart enough to set this property for you based on the actions you take (you do not have to worry about setting it). These two classes are extremely small and lightweight in size.

proxystub1

With these two classes you work with data on the client side of a conversation without EntitySpaces being present, but something is missing, a feature that hooks most EntitySpaces developer once they start using it.

New Functionality Coming in ES2009 Q2

In our ES2009 Q2 release the Client Side template will now generate a new, optional, third class, the "QueryProxyStub" class. Yes, you guessed it, the full EntitySpaces DynamicQuery API now available on the client side of a two-way conversation. Take a look at the SuppliesQueryProxyStub class below. This class is just like the DynamicQuery classes you are accustomed to using already only it inherits from a new class named esDynamicQuerySerializable. If you take a close look at the methods in the esDynamicQuerySerializable class you will notice that there are no methods to load or execute the query itself (more on this later). This query can only be created, defined, and then serialized back to the server (a very cool way to write a Silverlight application). If you have never seen how powerful our DynamicQuery API is check out our Showcase post HERE.

proxystub2

Now, imagine that you're on the client side of a WCF conversation or even running down inside the browser in a Silverlight application and you need to query your Supplier table for data. No problem, here is how you would accomplish that task with the new proxy query class.

SuppliersQueryProxyStub sQuery = new SuppliersQueryProxyStub ();
sQuery.Select(sQuery.SupplierID, sQuery.Region);
sQuery.Where(sQuery.Country == "Spain");

Notice that we do not call sQuery.Load(). This is because the esDynamicQuerySerializable has no way to actually load data, it represents the query only, the ability to load it (or execute it) exists on the server side of the conversation. Also, the full join syntax is available although it is not shown above in the query. The proxy queries are fully serializable which is the key to how it works. At a very high level this is how you would fetch data from the server, imagine a method like this:

public SuppliersCollectionProxyStub FetchSupplers(SuppliersQueryProxyStub query)

You would transmit the proxy stub query to the server, where it will be deserialized, assigned to a full server query object, executed, and then the resulting proxy stub collection would be returned. The code will look very much like this.

public SuppliersCollectionProxyStub FetchSupplers(SuppliersQueryProxyStub query)
{
    SuppliersCollection coll = new SuppliersCollection();
    coll.Query = query as esDynamicQuerySerializable;
    coll.Query.Load();

    // more code below ...
}

Notice how we are able to merely assign our SuppliersQueryProxyStub object to the full blown SuppliersCollection's query object and then execute it. Could it be any easier?

EntitiySpaces.DynamicQuery - A New Assembly

Just where does this esDynamicQuerySerializable class that our SuppliersQueryProxyStub inhertis from live? The answer is a new assembly that will ship with ES2009 Q2 named EntitySpaces.DynamicQuery.dll. This is very tiny (less that 50k) assembly that only references System.Core and System.XML and is fully Silverlight 2.0 compliant. It does not link with EntitySpaces.Core or EntitySpaces.Interfaces. However, even better we are not maintaining two separate DynamicQuery API's. This new assembly and class is used on the server side as well, which means this new assembly is required now for EntitySpaces applications. Look at the diagram below which shows the hierarchy of a normal DynamicQuery class as generated by the ES2009 Q2 Generated Master template. This preserves your current API.

proxystub3

Notice the the original base class esDynamicQuery is still there, however, it now inherits from the esDynamicQuerySerializable class. In order to run under Silverlight our client side DynamicQuery assembly could not reference the System.Data namespace, so we have separated the original esDynamicQuery into the two classes you see above.

What Does it All Mean?

Our new enhanced client side proxies will allow you to have a "Virtual EntitySpaces Architecture" running almost anywhere including mobile devices, Silverlight applications, WCF scenarios, and webservices. It will act and feel just like EntitySpaces Of course, we can already run in all of these environments but with ES2009 Q2 and the addition of the DynamicQuery proxy and the massive DynamicQuery API enhancements that are also coming you will truly be blown away by the productivity and reach of the EntitySpaces Architecture. The only thing that is required on the client to make this all possible is the tiny EntitySpaces.DynamicQuery assembly (less than 50k) which is completely Silverlight compliant. There are other enhancements that will be made to the proxies but we will keep them small and lightweight.

There are also a few technical issues we must solve yet, though most have been worked out. For example, where do the extra properties go when you bring them back via a join? In the full server side classes this is handled gracefully, and we make those properties appear as if there are in your strongly typed entities via sophisticated binding support. How do we do this on the client side? These are a few of the issues we must solve yet.

We find this new support terribly exciting and it presents almost boundless usage scenarios. Especially when you factor in the enhancements we are making to DynamicQuery API itself, but that is the topic for another post. And keep those comments coming in our ES2009 Wish List forum, we are listening and will implement a lot of your requested features.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, March 01, 2009 1:31:36 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, February 24, 2009
kick it on DotNetKicks.com     Shout it

EntitySpaces is pleased to announce support for the Sybase SQL Anywhere Database Management System. Our plan is to support iAnywhere for both high end server applications as well as on the Compact Framework for mobile applications which will further strengthen EntitySpaces' mobile abilities (we already support Microsoft SQL CE and VistaDB for mobile applications). If there is demand we will consider supporting the Sybase SQL Anywhere UltraLite version as well.


SQL Anywhere provides data management and exchange technologies designed for database-powered applications that operate in frontline environments without onsite IT support. It offers enterprise-caliber features in a database that is easily embedded and widely deployed in server, desktop, remote office and mobile applications. Sybase iAnywhere has been named number one in the worldwide mobile device management enterprise software market for the seventh consecutive year.

sybase

The image above shows EntitySpaces 2009 walking the SQL Anywhere Demo Database metadata. We have already generated a full EntitySpaces set of classes complete with our hierarchical object model against the Sybase demo database and have created an EntitySpaces.SybaseSqlAnywhereProvider.dll DataProvider that can successfully query Sybase using our DynamicQuery API. For instance, we are able to execute queries like this just fine.

EmployeesCollection coll = new EmployeesCollection();
coll.Query.Select(coll.Query.DepartmentID, coll.Query.City);
coll.Query.Where(coll.Query.City.Like("%F%"));
coll.Query.Load();

Of course, our Sybase support will have to fully pass our massive NUnit test suite before being released which won't actually happen until our ES2009 Q2 release. But we have made enough progress now that we can safely announce our support for Sybase. We would also like to thank the folks at Sybase for working with us and making themselves available to us. We are extremely impressed by their support and dedication to customer satisfaction, something rarely seen today from large companies, so a big thumbs up to the folks at Sybase.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Tuesday, February 24, 2009 10:46:20 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, February 18, 2009

Nick Dunham, an EntitySpaces user, created a very nice PDF and sent it to us. We thought it was great and decided to share it on our blog. Here is a snippet from the document ...

EntitySpaces 2009 (ES) works great for setting up and running projects from within Visual Studio (VS). Once I have a project set up, I can execute it by opening “Tools | EntitySpaces”, load my project, and go. As a companion to this, I started using the new command line version of EntitySpaces so I could skip the basic steps (once I configured my project with the tool). The setup instructions below allow me to execute an ES project using the External Tools features of VS ...


Checkout the PDF file HERE or a ZIP file HERE. It's best viewed when zoomed to around 150% to 175% depending on your monitor size.

Nick W. Dunham, University of Florida
Office of Research, Director of Information Services


EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, February 18, 2009 7:52:12 PM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, February 15, 2009

We have created a video to demonstrate the usage of our EntitySpaces 2009 Projects Files. Watch the video and project files will quickly become one of your favorite features of our Visual Studio Integration.

Please give the video a few moments to load.

 

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, February 15, 2009 3:31:40 PM (Eastern Standard Time, UTC-05:00)  #   
 Monday, February 09, 2009
kick it on DotNetKicks.com      Shout it

EntitySpaces 2009 Persistence Layer and Business Objects for Microsoft .NET

We are pleased to announce the official release of EntitySpaces 2009 Q1. The version number is 2009.1.0209.0. The Trial Version has also been upgraded to the official release. EntitySpaces 2009 Q1 is a terrific product, if you have been using our beta or our release candidate then you know EntitySpaces 2009 feels like putting on your favorite pair of jeans, it's just feels right. No longer are we dependent upon third party code generation tools and this frees us up to be really creative.  EntitySpaces 2009 is also very high performance as it contains the performance enhancements we made at the tail end of 2008. Customers who have source code access will be able download it within a few days.

ES2009_Download

Features of EntitySpaces 2009:

  • Complete Visual Studio integration.
  • Stand alone executable for those not using Visual Studio.
  • No third party code generation tools required (No need for MyGeneration or CodeSmith). 
  • Project files to record and play back your code generation process with a single click.
  • Command line tool that can execute your EntitySpaces projects in continuous integration builds.
  • Debugger Visualizer and other debugging enhancements.
  • Totally updated Web Admin Templates.
  • Lots of samples available on the EntitySpaces 2009 menu after installation including:
    1. EntitySpacesDemo (C#) - Windows Forms
    2. EntitySpacesDemo (VB) - Windows Forms
    3. SqlCeDemo (Mobile Application) - SQL CE Mobile Application
    4. esDataSource (C#) - ASP.NET Web App, uses the esDataSource DataSourceControl
    5. esDataSource (VB) - ASP.NET Web App, uses the esDataSource DataSourceControl
    6. WCF Demo (C#) - Very extensive WCF Demo using our Full and Lightweight Proxies
    7. Template User Interface (C#) - Demonstrates how to extend our templates without actually modifying our UI

Fixes since the Release Candidate:

Below are the fixes and enhancements that have been made since the release candidate.

  • The SQL CE connection problem has been fixed.
  • The VistaDB connection hang on a bad connection string has been fixed.
  • DebuggerVisualizer capability is now included.
  • DebuggerDisplay attributes is now supported.
  • The Smiley Face icon is no longer our icon in Visual Studio.
  • There is a new sample demonstrating how to expand our template user interfaces.

Installation Instructions For those who have it already installed

  • Close Visual Studio
  • Uninstall your current version of ES2009 (you will not lose your connection settings)
  • Open Visual Studio - Answer yes to disable our Plug-in
  • Close Visual Studio
  • Install the official ES2009 Release

Finally, we would like to thank our customer base for all of the great and well thought out suggestions we are getting for ES2009 Q2 in our "Q2 Wish List" forum. We are very impressed with the thought and detail you are putting into your posts. If you are a potential custom looking at our forums those are the unanswered posts you see in our forums.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Monday, February 09, 2009 11:21:43 PM (Eastern Standard Time, UTC-05:00)  #   
 Saturday, February 07, 2009

While we were adding the Debugging Visualizer logic we went ahead and added DebuggerDisplay Attributes on the Collection, Query, and Entity classes. This really helps when you look at things in watch windows. Below is a quick preview of some new enhancements coming in the official ES2009 Q1 released scheduled to be out this weekend if all goes well.

debug1

Notice the last two checkboxes (above) on the "Generated Master" Advanced tab. The DebuggerDisplay option is turned ON by default. The DebugVisualizer is OFF by default as it requires that you link to an additional assembly, but it's very cool see part one.

Here is the code we executed. Once the collection was loaded and our breakpoint was hit you can see how our watch window looks like below as well.

EmployeesCollection coll = new EmployeesCollection();
coll.Query.SelectAll();

if (coll.Query.Load())
{
    // Breakpoint here ...
}

This is our watch window ... (notice the Value column)

debug2

Notice the "coll" variable shows the Count as it's value and if we look at coll.Query property it shows the "LastQuery" value. Finally, if we index into the collection to look at actual entities you will see the entity type plus it's primary key value(s) - works for composite primary keys of course.

Well, back to work ....

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Saturday, February 07, 2009 2:43:55 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, February 05, 2009

Here is a sneak peak at our Debugger Visualizer for EntitySpaces 2009 that will be included in the official release. When inspecting variables in the debugger you will notice that there is now a magnifying glass next to your EntitySpaces collections as shown in the image below. Notice the magnifying glass on the BusinessObjects.EmployeesCollection.

visualizer1

When you select the EntitySpaces Debugger Visualizer you will be presented with this window which will display the contents of your collection. Remember, this all happens when you are debugging.

visualizer2

You can sort, rearrange columns, and see the dynamic query (if any) that was used to fetch the data. This could be a useful feature when developing your EntitySpaces applications. This does require that you check an additional checkbox on the "Generated Master" template and then link your application with our EntitySpaces.DebuggerVisualizer.dll. There is no performance issue with generating your code like this, it's purely a debugging feature. This is a pretty simple debug visualizer however we will enhance it to support single entities and additional data in future releases.

[MODIFIED]

If you check the DebugVisualizer on the Advanced Tab of the "Generated Master" template here are the steps you need to follow:

  • Add a reference to the EntitySpaces.DebuggerVisualizer.dll assembly.
  • Add a reference to "Microsoft.VisualStudio.DebuggerVisualizers .NET 9.0.0.0".
  • Call the static method to initialize the Visualizer during your application startup, like this,  esVisualizer.Initialize().

However, we strongly recommend that you regenerate before you ship without the Visualizer checkbox checked and then you will not need to ship the Visualizer assembly (strongly recommened).  

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, February 05, 2009 10:04:34 PM (Eastern Standard Time, UTC-05:00)  #   
 Wednesday, February 04, 2009

We have created a new forum so that we can solicit feedback from you in a specific place and not lose track of it. So here we go, if there are features, bugs, other databases you want supported you have a voice. If you have already made such a request somewhere else in the forums please post it in this new forum also to be sure it's on our radar. We have always been very customer driven and this will allow you even more input. Of course, not everything posted will get implemented, but your input will definitely have an impact on the next release. There are a few simple rules you can follow that we really help us out.

  1. Create a brand new post unless you can see your issue is clearly covered in another post (in this forum).
  2. Please present your idea clearly, post example code if need be, and be sure to use the code window if posting code.
  3. Please do not hi-jack existing threads and take them in totally new directions. This inevitably will happen, we understand, we expect some brainstorming in here so it's okay.
  4. Definitely ping or bump other posts that you agree with so that we know you also support the requested feature or fix.

We won't skew the input into this process by posting our roadmap or ideas for Q2 and thereafter, we want to hear from you.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Wednesday, February 04, 2009 8:24:02 AM (Eastern Standard Time, UTC-05:00)  #   
 Sunday, January 25, 2009

The Release Candidate for EntitySpaces 2009 has been published. The Version Number is 2009.1.0126.0. Here is what you will find that is either new or enhanced in the Release Candidate.

YOU MUST UNINSTALL ANY PRIOR VERSIONS OF ES2009 INCLUDING BETA III OR YOU "WILL" HAVE PROBLEMS. HOWEVER, YOU WILL NOT LOSE YOUR SETTINGS, JUST MAKE SURE YOU HAVE VISUAL STUDIO CLOSED UNTIL YOU HAVE UNINSTALLED AND INSTALLED THE RELEASE CANDIDATE.

 

  • A new very comprehensive WCF Sample is now included, the Readme can be seen ==> HERE.
  • There is now a VB version of the EntitySpacesDemo (thank you Martin).
  • The Web Admin Grids have now been fixed to work properly with Views.
  • The Settings tab now displays the EntitySpaces version number.
  • The EntitySpaces.CommandLine.exe tool is now included.
  • The esDynamicQuery has a new method named SelectAllColumnsExplicity() which will select all columns by name as opposed to Select *

Be sure to check the EntitySpaces 2009 menu after installation. Everything now is available from our menu, including all of our samples. You can choose them from our menu and they will compile cleanly right out of the box, no need to add references, just change the config file connection string and you're off.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Sunday, January 25, 2009 7:17:11 PM (Eastern Standard Time, UTC-05:00)  #   
NOTE: THIS IS THE READ ME FROM OUR NEW WCF DEMO INCLUDED IN THE ES2009 RELEASE CANDIDATE
 
Welcome to the

EntitySpaces 2009 Q1 WCF Demo

Created by Jon Davis for EntitySpaces, LLC

Contents

Introduction

This sample solution includes a set of projects that illustrate the use of EntitySpaces with Windows Communication Foundation (WCF), which is a technology featureset that arrived when Microsoft .NET 3.0 was released.

This demo is based on .NET 3.5 / Visual Studio 2008. It does not delve into WCF education or theory; it is only a "getting started" sample application that demonstrates how EntitySpaces objects can be used in a WCF architecture.

This is a lightweight sample that does not demonstrate more complex scenarios, such as working with data objects with one-to-many relationships.

Quick Start

This section is provided for those who just want to get the demo up and running and don't want to delve into the details.

To run the demo:

  1. Check the References of each project. If any of the EntitySpaces assembly references are broken (i.e. showing the "missing" icon), you will need to re-reference them. They should be in:
       %ProgramFiles%\EntitySpaces 2009\Runtimes\.NET 3.5\
  2. Make sure SQL Server Express is installed locally, and that you are a SQL Server admin. If the server is not running as ".\SQLExpress" you need to edit the app.config file in the ES2009WCF_Server project and rebuild the solution after reviewing #1 (above).
  3. In Visual Studio's Solution Explorer, right-click on the project called ES2009WCF_Server and choose Set as StartUp Project.
  4. Start Debugging. If you don't run into any errors and all is well, go ahead and shut it down (hit ENTER and let it quit).
  5. In Windows Explorer, track down the server's EXE file. It should be something like %DEMO%\ES2009WCF_Server\bin\Debug\ES2009WCF_Server.exe. Run it.
  6. In Visual Studio, for each of the client projects (each of the projects that are suffixed with "Client"), expand "Service References and right-click on the service reference item (should be something like "ESDemoService") and choose Update Service Reference.
  7. Stop the server process you started two steps previously (hit ENTER and let it shut down).
  8. Choose one of the client projects (any project suffixed with "Client") that you would like to run, right-click it, and select "Set as StartUp Project".
  9. Rebuild Solution.
  10. Start Debugging. The demo server will start automatically (after a prompt).

Troubleshooting:

  1. If with any client project you get an exception saying something followed by ".. The client and service bindings may be mismatched," stop the debugger, keep the server running, and right-click the service reference item in the project (in Solution Explorer) and choose Update Service Reference.
  2. If after the server starts successfully you get a System.ServiceModel.EndpointNotFoundException with a message "Could not connect to http://localhost:8731/ESDemoService/Light/. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8731," you will need to temporarily disable Windows Firewall or poke a hole on port 8731 and/or on behalf of all EXE's involved.
  3. Be sure to restart the demo server's .EXE (or just kill it and let the demo client start it) as it may get locked in a Faulted state if an exception occurrs.

To create WCF projects:

  1. With EntitySpaces DLLs referenced on the client:
    • You will be using the Full / Heavy Proxies on both client and server. These are included with EntitySpaces' Master template.
    • You should use a shared library to be used on both client and server containing your generated business objects.
    • WCF will automatically serialize/deserialize and bind to your EntitySpaces-based library.
    • You will be able to use the Query object using manual binary serialization. (You cannot use XML serialization of the Query object in the ES2009 Q1 release, but XML serialization is planned for Q2.)
    • For a service sample, refer to demo project ES2009WCF_Server, file Full->ESDemoService_Full.cs.
      • The service was created by right-clicking on the project, choosing WCF Service, and then replacing the DoWork() method with real methods, both on the interface file and on the class.
    • For a client sample, refer to demo project ES2009WCF_Full_ConsoleClient or ES2009WCF_Full_WinFormsClient.
      • The WCF client was bound by manually starting the server app (ES2009WCF_Server.exe) from Windows Explorer, right-clicking on the client project in Visual Studio, choosing "Add Service Reference...", entering the service URL as shown on the server app console (this is set in the server app's app.config), clicking "Go", expanding the tree, selecting the interface, and choosing OK.
      • By default, the Service Reference configuration has "Reuse types in referenced assemblies" checked.
  2. Without EntitySpaces DLLs referenced on the client:
    • You will be generating Lightweight Proxies for your clients. These are created from EntitySpaces' generator seperately by expanding the ProxyStub tree branch (in the Templates tab) and running the Client Side Proxy/Stub.
    • The server will still use the Full / Heavy Proxies; however, ...
    • You should plan on serializing/deserializing your objects manually, both on client and server. A wrapper class called XmlSerialized<T> is provided with the demo to make this easier.
    • You will not be able to use the Query object in the ES 2009 Q1 release.
    • For a service sample, refer to demo project ES2009WCF_Server, file Light->ESDemoService_Light.cs.
      • The service was created by right-clicking on the project, choosing WCF Service, and then replacing the DoWork() method with real methods, both on the interface file and on the class.
    • For a client sample, refer to demo project ES2009WCF_Light_ConsoleClient.
      • The WCF client was bound by manually starting the server app (ES2009WCF_Server.exe) from Windows Explorer, right-clicking on the client project in Visual Studio, choosing "Add Service Reference...", entering the service URL as shown on the server app console (this is set in the server app's app.config), clicking "Go", expanding the tree, selecting the interface, and choosing OK.
      • The sample app demonstrates how serialization/deserialization was performed with the lightweight proxies.

Pre-Setup

This demo requires SQL Server 2005 (Express, Standard, or Enterprise edition) to be installed and running on the machine you are running the demo on. (You can get SQL Server Express edition for free at http://www.microsoft.com/express/sql/default.aspx.)

Your SQL Server instance needs to recognize you as an administrator, as the demo server will auto-create the database and database tables when it runs. You can remove this behavior and create the demo database and table(s) manually by opening the app.config file in the ES2009WCF_Server project and changing the appSettings values of createDatabase and resetTableData to false.

If you do decide to create the database and table manually, here is how it should be configured. The database name should be ES2009WCFDemo. You should have the following table structure(s):

USE [ES2009WCFDemo]

/****** Object:  Table [dbo].[Employee]    Script Date: 01/21/2009 17:30:16 ******/
SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Employee](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [FirstName] [nvarchar](50) NULL,
    [Age] [tinyint] NULL,
    [Salary] [money] NULL,
 CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED 
(
    [Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

This is the same SQL script that is used automatically (if enabled) when the demo server is run .

You also need to validate the connection string in the app.config file under ES2009WCF_Server. By default it points to the server ".\SQLExpress".

Creating The Employee EntitySpaces Objects

The first thing that was done when creating this demo was the creation of an Employee database table and the EntitySpaces objects that work with it. The Employee schema is described previously (see Pre-Setup). The EntitySpaces objects were placed in a shared library that contains all business objects that can be used both on the server and in a full (EntitySpaces-referencing) client. This is database-secure because a client does not have a database connection string in the generated code nor in its config file, it only has WCF references if so architected.

To generate EntitySpaces objects,

  1. Open the EntitySpaces generator by selecting Tools -> EntitySpaces in Visual Studio.
  2. In the Settings tab, click Configure Connection and point the generator to the Employee database. For this demo, the following was used:
    • Server: .\SQLExpress
    • Security: Integrated Security
    • Database: ES2009WCFDemo
  3. In the Templates tab, expand Templates->EntitySpaces->2009->C# and then select Generated - Classes Master (C#)
  4. Click the green Execute button.
  5. In the dialog that comes up, under Select the Output Path enter the file path to the shared library project that will be used to keep EntitySpaces business objects.
  6. The Namespace should be the namespace for your shared library.
  7. The Connection Name should be the name that will be used on your server to identify the connection string.
  8. The Tables or Views and Select Tables will be automatically selected as Tables and Employee, respectively.
  9. Click into the Proxy/Stub tab. Check the Generate the Proxy/Stub option as well as Support WCF.
  10. You should also specify a custom DataContract URI.
  11. When you click on OK, the files will be generated in the Output Path you specified.
  12. Go to Visual Studio's Solution Explorer, click on the shared library project, and then click the Solution Explorer toolbar button called "Show All Files". You should see the Generated folder that EntitySpaces created. Right-click on it and choose "Include".

When using lightweight proxies/stubs, will need to run the generator again for the client project to create special lightweight proxies/stubs. Remember that lightweight proxies/stubs are used primarily if your shared library, as well as EntitySpaces' runtime libraries, will not be referenced by the client application. So in this case, the client will need generated stubs.

So to create the lightweight proxies/stubs for the client, follow the same steps as for creating the "Classes Master" objects, except:

  1. Instead of using the template Generated - Classes Master (C#), expand ProxyStub and select Client Side Proxy/Stub
  2. In the field Select the Output Path, enter the path to your client app project instead of the shared library which will not be referenced in your client app.

Creating The WCF Server

The WCF Server in this demo (project ES2009WCF_Server) is just a console application with ServiceHost. You can also host WCF services in IIS 7 or with WAS (Windows Activation Services) but that is beyond the scope of this demo; again, WCF education is not the intent with this demo but rather how EntitySpaces can work in a WCF architecture.

Initializing EntitySpaces For The WCF Server

Before doing anything with EntitySpaces within a server application, an app.config file needs to be created.

  1. Right-click the server app project in Solution Explorer and select Add Item...
  2. Select Application Configuration file. (Retain the default filename, app.config.)
  3. When the file is added to the project, click on the file in Solution Explorer, then under Properties set Copy to Output Directory to Copy if newer. Note: Visual Studio automatically renames this file to %assemblyname%.config in the output directory when the project is built.

After setting up the app.config file with EntitySpaces settings, the first thing our server app needs to do in order to work with EntitySpaces and with the database is initialize EntitySpaces with:

esProviderFactory.Factory 
    = new EntitySpaces.LoaderMT.esDataProviderFactory();

About The XmlSerialized<T> and BinarySerialized<T> Wrappers

Before moving on, it should be noted that there are a few scenarios where manual serialization must be used when working with EntitySpaces over WCF. While EntitySpaces business objects can be generated with WCF compliance, EntitySpaces was not built around WCF (WCF is a relatively young technology, and Visual Studio's and .NET SDK's generation of WCF stubs is not fully evolved to handle all scenarios). For example, the manual serialization is necessary to retain the behavioral functionality of the EntitySpaces objects such as change/dirtiness state on the client in the conformance pattern used by EntitySpaces.

Examples of manual serialization for WCF have been posted in the EntitySpaces forums and blog, namely

  1. here: EntitySpaces WebServices Example Application (with WCF implications)
  2. and here: Pure WCF Client Side Proxies

The samples provided prompted the creation of a pair of serialization wrappers that I, the creator of this demo, decided to produce both for this demo and for future use anywhere manual serialization/deserialization is needed.

I posted the wrappers and documented them on my own blog:

Jon Davis: XmlSerialized<T> and BinarySerialized<T>

These wrappers are used extensively throughout this demo, primarily:

  • BinarySerialized<T>, utilized for exposing the Query object over WCF for full proxy clients.
  • XmlSerialized<T>, utilized for exposing all lightweight proxies/stubs for the lightweight clients that do not reference EntitySpaces.

Creating The Full & Lightweight Proxy Services

To create a WCF service that exposes API points for clients, Visual Studio's WCF Service template items were used:

  1. Right-click on the server project in Solution Explorer and select Add -> New Item...
  2. Select WCF Service and give it an appropriate name.
  3. In the generated interface file (the file prefixed with an 'I'), replace the DoWork() method interface declaration with the methods that are appropriate for your service. (Don't forget to mark each method with the [OperationContract] attribute.)
  4. In the generated class file, just right-click on the interface name where the class name is declared, and select "Implement interface". You may want to remove the #region markers to keep it clean.
  5. The generated method stubs should look like the ones illustrated in the ES2009WCF_Server project, under the Full and Light directories.
    • The Full directory demonstrates a service that would be used for clients that can reference EntitySpaces runtime libraries and would therefore also reference a shared library that is referenced by both client and server.
    • The Light directory demonstrates a service that would be used for clients that do not reference EntitySpaces runtime libraries. These clients would need the lightweight proxies/stubs to be generated specifically for the client. For more information, see the earlier section Creating The Employee EntitySpaces Objects.

About The Server Demo Tests

Some simple tests were added to the ES2009WCF_Server project while creating the server just to make sure things are working. This isn't a TDD implementation but basic invocation of some of the services' API is demonstrated.

The Console-Based Full Proxy Demo Client

This client app will automatically start the WCF Demo Service.

The first client that was created for this demo was the Console-Based Full Proxy Client. This is just a console application that invokes some of the WCF API points. It was created to test and make sure that the WCF services were working correctly. The net result is a demonstration of code that illustrates how EntitySpaces can interact with a WCF service using full proxies.

The verbiage of "full proxies" used here means that the client has EntitySpaces runtime libraries referenced, as well as a shared library that contains the business objects used on the server. The client sees these objects in the same way as the server sees these objects. The only difference is that the client cannot invoke the database directly through the EntitySpaces API. Instead, WCF must be used to explicitly manage all queries using the API points established by the server's WCF services.

Note that the "full proxy" implementation partially supports binary serialization of Query objects so that you can perform a filtered query from a client over WCF. This is partially demonstrated in the demo app by filtering on the Employee's FirstName property.

The Console-Based Lightweight Proxy Demo Client

This client app will automatically start the WCF Demo Service.

The Console-Based Lightweight Proxy Demo Client is a complete API demonstration of the WCF service that was exposed for lightweight proxies. It does not reference EntitySpaces runtime libraries nor any shared libraries except for core .NET libraries and the project that contains the Serialized utility classes discussed earlier.

Note that the special proxy/stub classes were generated for this client and added to the client project.

The WinForms-Based Full Proxy Demo Client

This client app will automatically start the WCF Demo Service.

The WinForms-Based Full Proxy Demo Client is a rich GUI illustration of how WCF can be used in a client/server application. It automatically loads all employees, allows you to edit the details of an employee, allows you to delete an employee, and allows you to create an employee. It also demonstrates the use of a binary-serialized Query object by displaying a filter form with a name parameter and range parameters for Age and Salary.

Coming Soon: The WPF-Based Lightweight Proxy Demo Client

We will be working on a WPF-based client that demonstrates the use of the lightweight proxy/stub classes to be released hopefully in the near future.

When EntitySpaces 2009 Q2 is released we will also have XML-serializable queries as well as a fresh new updated Silverlight demo that illustrates its use. This, too, will utilize the lightweight proxy/stub classes that unfortunately the ES 2008 Silverlight demo [1, 2] did not properly illustrate as the proxy/stub classes were not generated for it.

Closing Comments

Hopefully this sample solution clearly demonstrates how EntitySpaces can work with WCF without any significant hassle.

Jon Davis produced this demo as an outside consultant. He is currently employed as a C#/NET Developer for a very prominent Internet services provider, but offers evening/weekend consulting services for both software and web solutions. He retains a blog at http://www.jondavis.net/techblog/.
posted on Sunday, January 25, 2009 6:15:03 PM (Eastern Standard Time, UTC-05:00)  #   
 Thursday, January 15, 2009

The Developer Site

We are working hard on expanding our new developer site and you should definitely begin to use this site. The search feature is very good. More and more on our forums we will be pointing you to the developer site. All of the samples are provided in C# and VB.NET. Two recent additions include:

  • EntitySpaces 2009 Application Documentation

http://www.developer.entityspaces.net/documentation/EntitySpaces2009/WhatsNew.aspx

  • SubQuery Documentation

http://www.developer.entityspaces.net/documentation/DynamicQuery/SubQuery/SelectSubQuery.aspx

VB.NET Sample Application

We will also be providing a VB.NET sample application matching our current C# sample with both the Trial and Developer installs.

WCF Sample Application

Finally, we are creating a very informative WCF sample application that will be available for download. It will also be presented most likely in a two part blog posting as well (and included in our developer site). This sample app will demonstrate end-to-end how to use our Full Proxy (FP) and Lightweight Proxies (LP) in WCF scenarios.

wcf_sample

 

So, remember to search on our developer site before posting on our forums to see if you can find your answer there. Remember, we will continually be adding new content.

EntitySpaces

From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

EntitySpaces LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net

posted on Thursday, January 15, 2009 11:20:53 PM (Eastern Standard Time, UTC-05:00)  #   
 Tuesday, January 13, 2009

Effective February 2, 2009 we are changing the price of our EntitySpaces Developer version. EntitySpaces Developer licenses are licensed per developer seat. A developer seat is required for each developer that uses the EntitySpaces API which includes using the generated classes in their programming tasks. The EntitySpaces Source Code does not count as a developer license.

The last time we changed our prices was in February of 2007, that was two years ago. EntitySpaces 2009 is a substantial improvement over EntitySpaces 2008 when it comes to Code Generation with the addition of our Visual Studio Integration. There are some very cool enhancements planned for the ES2009 architecture after the Q1 release. If you are a current customer you can renew your license before the February 2nd, 2009 price increase one time.


The new pricing is as follows:

Developer Version

Current =>  149.00 Per Developer   89.40 Renewal
As of Feb 2nd, 2009= >  299.00 Per Developer 179.40 Renewal

Source Code  

Remains Unchanged =>  499.00 Per Developer 299.40 Renewal

Quantity Discounts

    • 2  to  4 developer licenses     = 10% 

    • 5 or more developer licenses = 20%

         Quantity discounts apply to items purchased at the same time.

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Tuesday, January 13, 2009 9:02:24 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, January 11, 2009

      Currently only the EntitySpaces Developer is available, the Trial version is not yet available. The Trial version will be published on the 12th (Monday night EST time). You can install Beta III right over the top of Beta II.

      Here are the fixes and enhancements in Beta III (Version 2009.0.0112.0).

      • The "What's New" tab now loads asynchronously so it no longer effects load time.
      • Added "Ctrl + A" support to select all tables or views in the template user interfaces. This was done on all table/view selection listboxes (excluding the Web Admin Grid templates).
      • There are now "Most Recently Used" lists available on both the Projects tab and Settings tab.
      • The Custom Master templates no longer overwrite existing files.
      • Fixed an error that could occur when saving project files.
      • Enhanced the Settings -> Naming Conventions -> Stored Procedure tab to help you visual customizations. We will also be doing this for the Class Names and Hierarchical tabs.

      The EntitySpaces.CommandLine.exe utility is also well underway. Once completed we will move from the beta to release candidate phase.

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Sunday, January 11, 2009 10:00:36 PM (Eastern Standard Time, UTC-05:00)  #   
       Wednesday, January 07, 2009

      This is not an example how to use EntitySpaces. Most everything shown below can be done through our DynamicQuery API which is the preferred way. For instance, the GetMaxSalary() example shown in the EmployeesCollection class below could be done via our DynamicQuery like this:

      EmployeesQuery query = new EmployeesQuery();
      query.Select(query.Salary.Max());
      int maxSalary = (int)query.ExecuteScalar();
      And the CustomLoad() load method shown in the EmployeesCollection class below could be done via our DynamicQuery like this: 
      
      EmployeesCollection coll = new EmployeesCollection();
      coll.Query.Where(coll.Query.LastName.Like("g%"));
      if(coll.Query.Load())
      {
          // Then we loaded at least one record
      }

      So, when you look at the class below remember this is merely to demonstrate to you some of the lower level support functions that you have at your disposal. The idea being, of course, even though you are using an ORM system generated via our ES2009 code generator you are not cut off from the low level ADO.NET API when you need to hug the metal.

      public partial class EmployeesCollection : esEmployeesCollection
      {
          public bool CustomLoad(string partialName)
          {
              // This populates the EmployeesCollection itself
              return this.Load(esQueryType.Text, "SELECT * FROM EMPLOYEES WHERE LastName Like {0}", partialName);
          }
      
          public DataSet GetDataSet(int someParameter)
          {
              // We hate DataSets ;)
              return this.FillDataSet(esQueryType.StoredProcedure, "TestProc", someParameter);
          }
      
          public DataTable GetDataTable(int someParameter)
          {
              // We hate DataTables ;)
              return this.FillDataTable(esQueryType.StoredProcedure, "TestProc", someParameter);
          }
      
          public IDataReader GetReader(string partialName)
          {
              // We hate DataReaders ;)
              return this.ExecuteReader(esQueryType.Text, "SELECT * FROM EMPLOYEES WHERE LastName Like {0}", partialName);
          }
      
          public int GetMaxSalary()
          {
              return (int)this.ExecuteScalar(esQueryType.StoredProcedure, "procGetMaxSalary");
          }
      }


      Of course, we don't really hate DataSets, DataTables, or DataReaders. If you are an EntitySpaces user then you know that using our DynamicQuery API is the way to go. However, if there is something you need that is not available in our DynamicQuery API you have full access to the underlying power of ADO.NET.

      There is also a utility class called esUtility that will allow you to access this lower level API without adding custom methods to your EntitySpaces classes. This can be useful when what you need to do doesn't really belong to a particular entity. Here is an example of using the esUtility class.

      esUtility util = new esUtility();
      IDataReader reader = util.ExecuteReader(esQueryType.Text, "SELECT * FROM EMPLOYEES WHERE LastName Like {0}", "g%");

      One thing to note is that you never use decorators on your parameters such as ? or @ or : (depending on your database). The EntitySpaces Data Providers do this for you. For instance, notice in the sample code below that we do not set the parameter name to "@Salary" rather we just use "Salary". This allows you to access stored procedures and still have a database independent application as the EntitySpaces Data Provider will "gussy up" the parameters with the proper decorator. In fact,  you really don't have to use the syntax below unless you need to provide extra information such as parameter direction or perhaps the precision or scale of a decimal for some reason. Otherwise you can just use the {0}, {1} syntax as shown above in the GetReader() method. Even when using the {0} syntax EntitySpaces will create a true parameter for you to ensure that no SQL injection attacks are successful.

      esParameters parameters = new esParameters();
      esParameter param = new esParameter("Salary", null, esParameterDirection.Output);
      parameters.Add(param);
      
      esUtility util = new esUtility();
      IDataReader reader = util.ExecuteReader(esQueryType.StoredProcedure, "GetMaxSalary", parameters);

      While were at it here's another data access tip. This tip allows you to trick your table based collection (via the DynamicQuery) to query against a view. Of course, you can generate entities from a view if you like but if you don't really want the additional classes you can use this technique instead. Notice how we set the QuerySource below.

      EmployeesCollection coll = new EmployeesCollection();
      coll.Query.es.QuerySource = "MyView"; // <== Select against this view
      coll.Query.Select(coll.Query.LastName, coll.Query.FirstName);
      coll.Query.Where(coll.Query.Salary > 50000);
      coll.Query.Load();

      This can be very useful since you can still commit this data back to the Employee table provided that you also brought back the primary key, of course. And remember, these are tricks, not necessarily how to use EntitySpaces. You can easily use our DynamicQuery API to build a join on the fly to that would accomplish the same thing as the view above.

      In summary we have worked very hard to expose all of the underlying power of ADO.NET and yet you never have to pull in SqlClient, OracleClient or any other ADO.NET provider. Better still you can invoke stored procedures and not lose database independence if that is what you are after. We hope you have learned a thing or two from this post.

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.


      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Wednesday, January 07, 2009 11:37:43 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, January 04, 2009

       

                                     

      posted on Sunday, January 04, 2009 6:48:54 PM (Eastern Standard Time, UTC-05:00)  #   
       Friday, January 02, 2009

      The ES2009 Beta II for both the Developer and Trial are now available for download. The version is 2009.0.0103.0 and you can install it right over the top of the previous Beta, just make sure you have Visual Studio closed.

      • User Metadata now truly works.
      • The C# and VB Web Admin Grids are available (documentation coming upon official release).
      • The DotNetNuke SQL Template is available. 
      • Npgsql 2.0.2.0 will now work during code generation (PostgreSQL Driver)

      At this point we are 100% functional. Everything should work, including Projects.  Now we merely "Beta" and work on the documentation and help files.

      We will also be creating some new video's, one on our Project files and one on how to use the Web Admin Templates.


      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Friday, January 02, 2009 11:09:58 PM (Eastern Standard Time, UTC-05:00)  #   
       Monday, December 29, 2008

      For those of you interested in the ASPX Admin Suite you will be happy to know these templates are being converted over into our ES2009 code generation model. The templates and the GridLoaders will be included with the installation and included in our BETA 2 which should be the final beta before the official ES2009 release. We are already generating fully functional admin pages via our C# Admin Suite and after we fully unit test it and fix any bugs mentioned in our forums we will create the VB.NET version. We will also provide much better documentation regarding how to generate your Admin Suite and what all the features in this powerful template do. The image below shows the ES2009 ASPX Admin Suite running under ES2009. The demo can be found HERE and we will upgrade it to our ES2009 model once we complete the templates.

       image

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Monday, December 29, 2008 8:41:49 PM (Eastern Standard Time, UTC-05:00)  #   
       Thursday, December 25, 2008

      We have created a very simple video that demonstrates how to build your first EntitySpaces 2009 application. This presentation really demonstrates how easy it is to create your application using EntitySpaces 2009 which is fully integrated into Visual Studio. This is the first in a series of videos that will demonstrate the power of EntitySpaces 2009.

      Click on the image below to start the video. Give it a moment to load.

      image

       

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Thursday, December 25, 2008 10:15:16 AM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, December 21, 2008
      kick it on DotNetKicks.com

      We are pleased to make the EntitySpaces 2009 Beta available for public release. The EntitySpaces 2009 Trial version is fully integrated with Visual Studio 2005 or 2008. There is also a stand alone executable for those not using Visual Studio.

      EntitySpaces 2009 Visual Studio Add-In features

      • Settings Tab   - Connect to your database and customize your code generation settings.
      • Projects Tab   - Record and playback code generation templates.
      • Templates Tab  - Execute Templates.
      • Metadata Tab   - Online database metadata and user defined metadata.
      • Mappings Tab   - Database to property type mappings.
      • What's New Tab - Keep you up-to-date with EntitySpaces News.

      If you are looking at starting a new project in 2009 take a look at EntitySpaces 2009. It's a great architecture and we no longer rely on a third party code generator. To get started, simply install and switch to the "Settings" tab and connect to your database and click the "Save" icon and you're off and running. We will be publishing a series of video's on how to use ES2009 soon. Watch for these on our blog.

      NOTE:
      After installation you should see "EntitySpaces" on the Visual Studio "Tools" menu. If you do not see it go to your Programs -> "EntitySpaces 2009" menu you will find a "Manual Setup" PDF file which outlines a few simple steps performed within Visual Studio to manually add EntitySpaces to your Visual Studio Tools menu. It's really very easy. If you are using an international version of windows you will need to follow those steps.

      Also, if you have the alpha or pre-beta installed:

      1. Close all instances of Visual Studio
      2. Uninstall the ES2009 Alpha or Pre-Beta
      3. Delete your C:\Documents and Settings\All Users\Application Data\EntitySpaces folder (will be a different folder on Vista)
      4. Now install the ES2009 Beta and go to the "Settings" tab and reconnect to your database  (THEN PRESS THE SAVE ICON ON THE SETTINGS TAB)

              

       

      EntitySpaces Features

      • Mono Support
      • Compact Framework Support
      • Medium Trust Support
      • Design Time Data Binding
      • Hierarchical Data Models
      • Powerful Dynamic Query API
      • Binary and XML Serialization
      • Data Provider Independence
      • Two Different Transaction Models
      • Saving via Stored Procedures or Dynamic SQL
      • Generated from your Database Schema
      • No XML mapping files. 
      • LINQ Support for Collections
      • Regenerate Without Losing Custom Business Logic
      • Source Code Available

       

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Sunday, December 21, 2008 8:13:44 PM (Eastern Standard Time, UTC-05:00)  #   
       Friday, December 19, 2008

      For customers only. If you can please download the ES2009 Pre-Beta in our downloads area and give it a run through and report anything back to us in our forums.

      IMPORTANT !!

      * Close all instances of Visual Studio

      * Uninstall the ES2009 Alpha

      * Delete your C:\Documents and Settings\All Users\Application Data\EntitySpaces folder (will be a different folder on Vista)

      * Now install the ES2009 Pre-Beta and go to the "Settings" tab and reconnect to your database
         (THEN PRESS THE SAVE ICON ON THE SETTINGS TAB)

      WHATS CHANGED

      * The International install issue is NOT FIXED YET but should be by this weekend

      * The "Projects" tab is implemented

      * Microsoft Access should work just fine

      * It should work on 64 bit machines

      * The stand alone app shouldn't require Visual Studio to be installed

      * The User Metadata is now saved

      * Various UI issues tweaked

      The reason we are releasing this pre-alpha is to get feedback from you before our official alpha release this weekend. The version number didn’t change, it's still versioned as the Alpha.

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Friday, December 19, 2008 12:37:48 PM (Eastern Standard Time, UTC-05:00)  #   
       Friday, December 12, 2008
      We thought we would share with you what came out of this past Wednesday's EntitySpaces Team meeting which we hold every Wednesday. Our plan is to release the ES2009 Beta on December 22nd. The Beta will be available to customers as a true Developer Version and to the public as a Trial version which will be posted on our download page. In fact, we will encourage new users to go with the ES2009 Beta over the EntitySpaces 2008 Trial version.

      The Beta should have full functionality including the Projects Tab which will allow you to record and playback templates (and it's very easy to use). We have fixed all of the issues reported in the Alpha and have made many more improvements.

      There are two items that will not be in the Beta that will be delivered in the official ES2009 release. The first being the ASPX Admin Suite. However, once the Beta is released we are going to be giving our full attention to the ASPX Admin Suite and will porting the C# and VB versions over to ES2009 template system and fixing all of the known issues. We know the Admin Suite has fallen behind and is really in need of some attention. Secondly, the ES2009 Command Line utility will also be created which will allow you to generate your EntitySpaces Architecture from the command line. This utility will be able to execute individual templates as well as entire projects.

      While we haven't committed to an official release date we have in mind the end of January 2009 as our goal but that is an aggressive date. Once we ship ES2009 we will be free of third party code generators and then turn our full focus to the EntitySpaces Architecture itself.

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

       

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Friday, December 12, 2008 9:49:47 AM (Eastern Standard Time, UTC-05:00)  #   
       Tuesday, December 09, 2008

      We have re-skinned our main site and we hope that you like what you see. We will be adding more content and changing our menu structure in the near future as well, so more changes are coming. Over the next few months we will be bulking up the documentation on our developer site. This will allow us to turn our main site into a marketing site that will convey the strengths and advantages of EntitySpaces and of course still act as our storefront.

      We at EntitySpaces, LLC would like to thank "Ann Chanyoursang" for designing our new DotNetNuke skin. Ann is a designer for AppTheory which is a development consultancy and a member of the Trend Core Group in Atlanta, GA. AppTheory has a unique perspective on DotNetNuke. With Core Team Developers on staff and a roster of top tier clients using DNN, AppTheory is considered one of the top DotNetNuke consultancies.

      Thanks Ann, great Job !!

      image 
       

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Tuesday, December 09, 2008 8:45:38 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, November 23, 2008

      We have released our EntitySpaces 2009 Alpha internally to our customers and if all goes well within a week or so we will publish a trial version on our download page for everyone to try. You can install ES2009 side by side with (but not over the top of) ES2008 without conflict. The ES2009 Alpha is really a trial version that is hard coded to expire on Jan 15th, 2009, however we will have a beta version out before it expires. There are no limitations however in the features. You will find it to be very convenient never having to leave Microsoft Visual Studio when you need to generate your EntitySpaces architecture. Our ES2009 AddIn for Visual Studio is compatible with both VS2005 and VS2008. You will also find a stand alone version of ES2009 on your Start menu after installation for those who are not using Visual Studio. Everything in the ES2009 AddIn for Visual Studio is also available in the stand alone version. EntitySpaces 2009 no longer relies on MyGeneration or CodeSmith for it's code generation. We now have our own code generation engine. Bringing everything in-house has drastically removed the complexities involved in downloading EntitySpaces and getting your first application up and running. Once you do that, we know you'll be hooked.bbb

      The "What's New" tab will keep you in touch with what is happening in the EntitySpaces community. You can even get to our forums, blog, documentation site, and home page from the "What's New" tab. You can click the "Embed" button and use the hosted browser within our AddIn itself and avoid lauching browsers. Give it a try, it's pretty cool. Of course, you will want to play around and figure out just how you want to dock your ES2009 AddIn depending how you intend to use it. It's nice to doc the AddIn in the center pane and then embed our documentation site on the "What's New" tab so you can use our documentation site within Visual Studio.

      We have improved our metadata providers for SqlCe and VistaDB. You should now be able to connect to any version of SqlCe without the need to recompile our metadata provider. See the instructions on the "Settings Tab" for how to indicate what version of SqlCe you want to use. Our VistaDB metadata provider now works with the latest version of VistaDB as well. Our VistaDB metadata provider is compiled against VistaDB version '3.4.3.69'. If you need to run against a different version you will find the solution file for it in the C:\Program Files\EntitySpaces 2009\CodeGeneration\EntitySpaces.MetadataEngine.VistaDB folder. Merely open it up, compile it, and then copy the EntitySpaces.MetadataEngine.VistaDB.dll assembly into your C:\Program Files\EntitySpaces 2009\CodeGeneration\Bin folder.

      There hasn't been much work done on the actual EntitySpaces architecture since our November release of ES2008. However, we did upgrade our PostgreSQL provider (EntitySpaces.Npgsql2Provider.dll) to use the lastest Npgsql version, '2.0.1.0'. We would like to give a shout out to the Npgsql team for all of their efforts.

      There are some things missing from the alpha that will make it into our beta version. There is currently no support to automatically add the generated files to your solution, however, that is coming. Of course, you can generate the files directly into your solution's folders using the output path on the "Settings Tab". Also, there is no project support yet that would allow to record template execution for later playback, this is coming soon as well. Finally, the template stack is not yet implemented.

      Overall, we are very pleased with the quality of the Alpha release. It is very stable as in the EntitySpaces tradition. You should be able to generate your architecture and compile it just fine. We are very interested to hear how the installation works for you. We have tested on both Windows XP and Windows Vista and we hope everything runs smoothly for you as well. Be sure and let us know what can make ES2009 better, any missing features? suggestions? We want hear from you. We have created a special section within our forums for reporting and commenting on the ES2009 Alpha release. Please make all of your posts in this new forum so there is no confusion with our ES2008 posts. So chime in on our Special ES2009 Forum and let us know how your install went and your initial thoughts.

      This year is going to be your year. We have taken the first step in making your 2009 the most productive year ever. After the initial release of ES2009 will will focus on the EntitySpaces Architecture itself. We will review our TRAC system for outstanding issues and will put out all call for fixes that you need or features that are important to you.

      EntitySpaces

      From Mobile Devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with Medium Trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

       

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Sunday, November 23, 2008 8:16:07 PM (Eastern Standard Time, UTC-05:00)  #   
       Wednesday, November 05, 2008

      You may have already noticed our new logo on our recently announced documentation site. You will gradually begin to see it replace our older logo on all content. Also, keep your eyes open for a totally new site. Good things are happening, watch for another blog post on ES2009 this weekend as well.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Wednesday, November 05, 2008 11:28:48 PM (Eastern Standard Time, UTC-05:00)  #   
       Tuesday, November 04, 2008

      EntitySpaces Co-Founder Scott Schecter will be in Las Vegas, NV for DevConnections '08 again this year. Scott will be manning booth #608 with AppTheory and giving away some free licenses of EntitySpaces in their drawing. If you are going to be in Vegas for DevConnections, stop by and say hi to Scott. Tell him what you love about EntitySpaces or what you would like to see added in the future. Find out more about the EntitySpaces 2009 visual studio add in or just shoot the breeze. We always love to hear from our customers, and it is exceedingly nice to get to meet them in person and shake their hand (and maybe have a scotch or two;). So if you are going to DevConnections stop in and say howdy. We would love to hear from you.

      FALL2008DEVCELL01
      posted on Tuesday, November 04, 2008 4:07:56 PM (Eastern Standard Time, UTC-05:00)  #   
       Monday, November 03, 2008

      From the very beginning, we have always tried to provide ample documentation for EntitySpaces. Since all of the team members are developers, we can certainly empathize with using a product that lacks in this area. As the product grew, and more documents were added, it became harder and harder to centralize all of the various resources for easy searching. We, previously, had documentation on our main site, in our forums, and in blog posts.

      Today, we are proud to announce the new EntitySpaces Developer Documentation Site. This site will house all EntitySpaces documentation in an effort to provide one centralized, searchable location. We have started consolidating all of our existing documentation there. If you find any content that is out of date, missing, or needs expansion, please create a post in our Developer Documentation forum and we will get the site updated.

      We hope you find this new resource useful. As always, any feedback is greatly appreciated.

      - The EntitySpaces Team

      posted on Monday, November 03, 2008 9:29:13 AM (Eastern Standard Time, UTC-05:00)  #   
       Saturday, October 18, 2008

      This post is a continuation of  EntitySpaces 2009 - Running under Visual Studio (Part 1)

      kick it on DotNetKicks.com

      Special Note: If you are investigating EntitySpaces this article gets a little technical. However, you will not have to write user controls or do anything other than browse to a template within Visual Studio and execute the desired template. This article is for some of our more advanced EntitySpaces users. Not only are we making EntitySpaces very easy to use but also very easy to extend. Everything you see in this blog post is running under Visual Studio.

      The Template Header

      imageIn this post we'll take a look at both the Template Browser and the template user interface mechanism. The Template Browser lists the templates in a tree based on each template's Namespace located in the template header (shown left). You can see from the TemplateInfo tag in the template header that there is both a Namespace and a UniqueID attribute. The UniqueID will be discussed later when we dig into the user interface. Now, however, let's take a look at the Template Browser. The Template Browser is shown below (while running under Visual Studio). 

       

      The Template Browser

      image

      You can select any template and click the green arrow to execute a template which will display the template's user interface, if any.

      The Template User Interface

      Look at the image below to get an idea of what happens when we click on the green arrow to execute the template. Notice the tabs on the image above are gone. Also notice in the open solution in our EntitySpaces.TemplateUI project there are three user controls. Basic, Advanced, and ProxyStub. These correspond to the three tabs you see on the screen below. We (and you) can write your user interface in pure Windows.Forms user controls and have full IntelliSense. You also have direct binding capabilities to our metadata. Now only that, but you can extend our templates with your own user interface by adding an additional tab. Again, this is only for necessary for those that want to extend EntitySpaces.

        image

      What you are looking at above is the template user interface which slides over and across the normal tabs. The template user interface is shown until you press Ok to execute the template or Cancel it. Once the template is executed the normal tabs such as Projects, Templates, and so on become visible again. It's pretty cool to see it in action. When the user presses Ok you simply stuff the users UI choices into the esMeta object's (metadata object) input Hashtable during the OnExecute method. So, how can you extend the user interface without modifying our templates and not be worried about a new release wiping out your changes? Easy. Let's look at how the UI works at a low level.

      A Template User Interface Tab

      Below is all that is necessary to add a tab to our existing templates, or add them for your own custom template. Notice we implement the ITemplateUI class. This means we need to implement the Init, OnExecute, and OnCancel methods. In the Init method, you tie your user control to a template via the TempalteInfo.TempalteId property, making sure to match it to the template's UniqueID in the template header (shown at the beginning of this post).

      image

      The above image is the code for the "Basic" tab that you see on the template user interface above. This is housed in it's own assembly and stored in a particular folder that the plug-in scans. Take a look at the Init() method which returns an esTemplateInfo object. Here we are indicating that when the template with the UniqueID of "2216AB4F-BDB4-47de-8412-8560C1F2F420" is executed we want this user control on a tab called "Basic Information". If you look at the OnExecute() method this is where we will store the users choices. (Later we will access them in our custom template). Recall that in ES2009 you will be able to add templates into our template stack to extend and customize EntitySpaces. The good thing is our templates will use use the same mechanism for our user interface. So, all three the tabs you see in the template user interface above are represented by an individual user control. The second parameter to Init() above is really the DTE2 ApplicationObject which will allow your user interface to have full access the visual studio solution just like our plug-in does. We pass it in as type "object" so that you are not forced to bind with the Visual Studio Plug-in assemblies unless you really want to.

       

      Binding to the Metadata in your User Control

      Notice how use the esMeta object passed into our ITemplateUI.Init() method to populate our user interface controls. Since this is all just normal Windows.Forms programming you can bind directly to our metadata collections and it could not be any easier.

      image

      We hope you like what you are seeing.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Saturday, October 18, 2008 9:50:27 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, October 12, 2008

      kick it on DotNetKicks.com plug


      EntitySpaces 2009 (see roadmap) will plug right into Visual Studio and it will use its own internal code generator. This means that Visual Studio users will never have to leave Visual Studio to work on or generate their EntitySpaces architecture. The image below shows how EntitySpaces 2009 looks embedded within Visual Studio. While it is likely to change a little before our first beta this should provide you with a feel for ES2009. The nice thing is that ES2009 is a dockable window just like any other window within Visual Studio, you can even generate your EntitySpaces classes directly into your solution and the folders/files will be created automatically for you. We are also making our VistaDB and SQL CE providers version independent so you will no longer have to deal version issues during code generation.

       

      The EntitySpaces 2009 Tabs

      • Projects Tab - Projects allow you to record templates so that you can play them back at any time. Thus, you can regenerate with all of the settings you used when you recorded the session originally.
      • Templates Tab - The template browser lists all of the templates available to you, you can launch them from this tab.
      • Metadata Tab - The metadata tab allows you to examine all of the database metadata that EntitySpaces provides to your templates during code generation. Also the user meta data can be edited through this tab which allows you to alias columns, indicate Oracle sequences, and other things.
      • Settings Tab - The settings tab is where you add connections to various databases, indicate paths such as where your user meta data is located, the location of your output folder, and all kinds of EntitySpaces configuration settings.
      • Mappings Tab - This tab lists the mappings between database column types to .NET types.

       

      esplug

      If you are not a Visual Studio user no need to worry. We will provide a stand alone windows forms application that will look and work almost exactly the same (see below).

       

      es2009_alone

      The image above is the same binary code that runs under Visual Studio. We are developing both the Visual Studio compatible version and the Stand Alone version at the same time. Expect another blog post by the end of October which provide you with more insight into ES2009 including many more screen shots. Our goal is to have our first beta out by the end of 2008.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Sunday, October 12, 2008 10:02:22 AM (Eastern Standard Time, UTC-05:00)  #   
       Monday, September 29, 2008

      This should be our final ES2008 Release as we expect to have an ES2009 beta out by the end of the year. Here are the changes.

      1) The byte[] properties (for image and binary data types) were not being marked as dirty when set and thus weren't being saved.

      2) esEntity.MarkAsDeleted() now throws an exception if you call it and there is no data.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Monday, September 29, 2008 1:56:30 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, September 21, 2008

      There were a few bugs found in our 0915 release and we felt the need to put out a new release to address them. We recommend that everyone on the 0915 release upgrade to our 0922 release. If you regenerated your classes on the 0915 release there is no need to regenerate your classes again on the 0922 release. We will post a 0922 Trial version very soon. You will know when the new Trial version is available by looking under the download button on our home page.

      Here are the issues that were addressed.

      1. There was a bug when binding to a grid and adding a new row through the grid interface, this has been fixed.
      2. There was a bug in certain complex hierarchical save scenarios, this has also been fixed.

      We have a slew of improvements and requests that we are  going to pour into ES2009. We have already converted our entire suite of C# templates to run under our new code generator so things are moving forward very nicely on ES2009.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Sunday, September 21, 2008 7:27:42 PM (Eastern Standard Time, UTC-05:00)  #   
       Wednesday, September 17, 2008



      EntitySpaces has teamed up with Justin Greenwood (shown left) of MyGeneration Software to create a brand new code generation engine for EntitySpaces 2009. Because of Justin's code generation expertise we contacted Justin and asked him to create a very simple, lightweight code generation engine whose only job is to execute templates. (There is no user interface support by design.) The code generation engine makes the EntitySpaces MetdataEngine available as an intrinsic object available to all templates through the "esMeta" property. We already have a working version of the code generation engine and thought we would share our progress with you.

      We have created a test form that invokes the code generation engine for testing. Here is the button click event that kicks the whole thing off.

      using EntitySpaces.MetadataEngine;
      using EntitySpaces.CodeGenerator;

      namespace Test
      {
          public partial class Form1 : Form
          {
              private void btnGenerate_Click(object sender, EventArgs e)
              {
                  EntitySpaces.MetadataEngine.Root esMeta = new EntitySpaces.MetadataEngine.Root();
                  esMeta.Connect("SQL", this.txtConnectionString.Text); // I'm Connection to Northwind
                  esMeta.LanguageMappingFileName = @"esLanguages.xml";
                  esMeta.UserMetaDataFileName = @"esUserData.xml";
                  esMeta.esPlugInSettingsFileName = @"esSettings.xml";
                  esMeta.Language = "C#";

                  Template template = new Template();
                  template.Execute(esMeta, "Master.est");

              }
          }
      }

      Master Template

      Here is what the "Master.est" template looks like. In the code above the connection string was set to the Microsoft SQL Northwind database and we have hard-coded the "Employees" table in the master template shown below.

      image 

      Sub Template

      Notice in the code above we execute a sub template named "Sub.est" and append it's output to our currently running template. We also show how you can have separate "pure code blocks" via the <script> tag. Below is the Sub.est template which is passed the "esMeta" object from the Master template and then runs through all of the columns in the Orders table.

      image

      The Output

      The output from the execution of the master template looks like this:

          EmployeeID
          LastName
          FirstName
          Title
          TitleOfCourtesy
          BirthDate
          HireDate
          Address
          City
          Region
          PostalCode
          Country
          HomePhone
          Extension
          Photo
          Notes
          ReportsTo
          PhotoPath

      <START|-|Wow, very cool|-|END>

      --> Sub.est

          OrderID
          CustomerID
          EmployeeID
          OrderDate
          RequiredDate
          ShippedDate
          ShipVia
          Freight
          ShipName
          ShipAddress
          ShipCity
          ShipRegion
          ShipPostalCode
          ShipCountry

      Summary

      At this point we have everything in place to provide a Beta version of EntitySpaces 2009 in a very short time frame. By having this all in house our code generation will be extremely easy for EntitySpaces 2009 and will not rely on third party tools. This also allows for our new code snippet model where a template is nothing more than a collection of code snippets which can be tweaked and replaced by our customers.

      Take a look at this mock master template.

      image

      All the master does is execute a set of sub templates that make up, for example, the single esEntity object. Now imagine a very cool UI that allows you to manage, edit, and customize these snippets and replace or tweak our properties, INotify support, or just add other methods and properties to your entities. And the best thing is you will not need to be a code generation expert, not by a long shot. We are very excited about EntitySpaces 2009. This is only a part of what is coming in 2009. Domain modeling and much more are on tap.

      For more on EntitySpaces 2009 take a look at our roadmap HERE.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer and Business Objects for Microsoft .NET
      http://www.entityspaces.net

      posted on Wednesday, September 17, 2008 2:46:31 PM (Eastern Standard Time, UTC-05:00)  #   
       Sunday, September 14, 2008

      We are pleased to announce that the official EntitySpaces 2008 0915 release is now available for download. This will be the final EntitySpaces 2008 release. Work is already underway on EntitySpaces 2009 and we will make a blog post filling you in on the some of details very shortly.

      New Features, Fixes, Enhancements

      1. Major Performance Improvements which all users will realize. See this blog post.
      2. The VistaDB provider now supports NEWID() and GUID() on inserts.
      3. IsDirty logic improvements (see below).

        Employees emp = new Employees();
        if (emp.LoadByPrimaryKey(1))
        {
            // At this point LastName = "'Smith"

            emp.LastName = "Crazy"; // emp.es.IsDirty = true
            emp.LastName = "Smith"; // emp.es.IsDirty = false
        }

      4. Added ExecuteReader and ExecuteScalar to the esDynamicQuery class. See this blog post. This can be very useful for retrieving large results sets for display purposes.
      5. Fixed the exception handling in FillDataTable and FillDataSet.
      6. Add Oracle FLOAT support.
      7. Added GetConnectionName() to allow classes to be configured to use a predefined connection string. See this blog post.
      8. Fixed the AcceptChanges/RejectChanges logic such that it always clears the ModifiedColumns.

       

      We will be publishing a new Trial Version later on this evening for the 0915 release.

      EntitySpaces

      From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, a Mono application, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases. EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

      The EntitySpaces Team
      --

      EntitySpaces LLC
      Persistence Layer