Sunday, June 18, 2006

[Upated September 30, 2006]

At first glance one might think that the new LINQ technology is a direct competitor to the EntitySpaces architecture; however that would not be a correct assumption. The LINQ Project is a codename for a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities. EntitySpaces LLC has added the ability to use the LINQ syntax against EntitySpaces collections as of our 1.5 release.

As LINQ nears its official release we will look at translating the LINQ IQueryable<T> expression trees into our query API. In fact, when LINQ is first released it will support SQL Server only and rumor has it that LINQ is still a year or more out though Microsoft hasn't stated a release date yet. 

Have a look at this example: 

EmployeesCollection coll = new EmployeesCollection ();
coll.LoadAll();
// All employees with "i" in the last name ordered by FirstName in decending order
var emps = from e in coll
where e.LastName.Contains("i") orderby e.FirstName descending select e; foreach(Employees emp in emps) { Console.WriteLine(emp .FirstName + ", " + emp.LastName); }

It is even possible to derive your own result sets via the LINQ query against an EntitySpaces collection.


EmployeesCollection coll = new EmployeesCollection();
coll.LoadAll();

// All employees with "i" in the last name ordered by FirstName in decending order
var emps = from e in coll
                where e.LastName.Contains("i") 

                orderby
e.FirstName descending
                select
new { e.FirstName, e.LastName };

foreach(var dude in emps)
{
    Console.WriteLine(dude.FirstName + ", " + dude.LastName);
}

Some links you'll find useful:
Using LINQ with ASP.NET   (Part 1)
Using DLINQ with ASP.NET (Part 2)

posted on Sunday, June 18, 2006 12:47:42 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]
 Thursday, June 15, 2006

We have had some issues come up that we thought should not wait until 1.5 is released. This maintenance release should hold you over until then. The DataGridView binding issues were the toughest nut to crack. And, unfortunately, those changes will require you to regenerate the Generated Master for your classes.

NOTE: You must regenerate your generated classes with the Master Template

EntitySpaces - Release Notes for 1.4.1 

  • Added “Use Schema” checkbox to SQL Server Stored Procedures template. Default is un-checked (dbo).
  • Changed MySQL Stored Procedure template delimiters from $$ to //.
  • Changed the esEntityCollection.Item Property so that it is no longer obsolete.
  • Fixed SqlClientProvider so that AnsiString output parameters now have the correct size property for computed columns.
  • Fixed bug in QueryBuilder for all 4 providers. If a Like() expression was used in the Where() clause before an Equal(bool) expression, then the parameter type for the boolean was set to a string.
  • Added two protected Methods to esEntityCollection:
    • AssignPrimaryKeys - Assigns the underlying DataTable's 'PrimaryKey' data member using the primary keys as defined in the collection's associated esColumnMetadataCollection.
    • RemovePrimaryKeys - Removes the DataTable's 'PrimaryKey' information by setting it to null. Call this to undo AssignPrimaryKeys().
  • Added three Properties to esEntityCollection:
    • AllowEdit - Default is true. Setting this to false prevents the user from editing a row in a DataGridView.
    • AllowNew - Default is true. Setting this to false prevents the user from adding new rows in a DataGridView.
    • AllowDelete - Default is true. Setting this to false prevents the user from deleting rows in a DataGridView.
  • Fixed esEntityCollection IBindinglList AddNew, ApplySort, and esEntity BeginEdit, CancelEdit, EndEdit, AddNew. This fixes the editing or clicking around in a DataGridView bug.
  • Fixed an issue where Extended Properties were not being included in the collection if MultiProviderMode was set to true.
  • Fixed DeleteAll() so that it honors the Filter(). Only records matching the Filter criteria will be deleted.
  • Fixed a problem that ocurred if your PrimaryKey column was not the first column in the table metadata.
  • Added a specific Exception for when you call Save on an entity that is part of a collection. You must call Save on the collection.


EntitySpaces Trial Version: 

  • The SqlDemo has been replaced by a new and improved EntitySpacesDemo. A zipped version with the runtime references removed is available on the Documentation|Downloads page.


Documentation: 

  • Added entries in compiled help for the new methods and properties.


Note: See the Release Notes for 1.4.1 for detailed installation and upgrade insructions.

posted on Thursday, June 15, 2006 12:03:31 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Monday, June 05, 2006

We have released the first version of our EntitySpaces Template Suite for ASP.NET. Try the DEMO

Here are the features:

  • All of the databases supported by EntitySpaces should work with these templates.
  • The ASPX pages generated build upon your already created EntitySpaces classes.
  • Both C# and VB.NET ASPX pages can be generated.
  • The look and feel of the ASPX pages are controlled by a very simple style sheet.
  • Master Pages are supported and optional (new with ASP.NET 2.0).
  • The generated ASPX pages use the new ASP.NET MultiView/View controls.
  • Browse, Detail, Edit and Search modes are supported.
  • You control what columns to display and in what order.
  • All column headers are clickable and sort the GridView(s).
  • Required fields use the RequiredFieldValidator control.
  • ForeignKeys are mapped to urls in detail mode and combo-boxes in edit mode.
  • Relationships can be mapped to subgrids in detail mode.

Simply generate your ASPX pages. Add them to your solution. Finally, add these files to your project. (The templates are installed to the EntitySpaces.C#.Web and EntitySpaces.VB.Web folders in MyGeneration. The files below are under WebTemplates in your EntitySpaces program folder.)

  • es_stylesheet.css
  • question.gif
  • GridBase.cs  - C# projects only
  • GridBase.vb  - VB.NET projects only

Both the installer and the DEMO site are available for download to all who have purchased EntitySpaces. See the download menu on the main EntitySpaces site. This new template suite will not be in the trial version. These templates are intended to provide the ability to administer databases over the web. This chore is typically overlooked although it is really needed. Such admin screens can eat up quite a bit of development time and they are much easier to generate. Other than the row of buttons at the top the demo site is 100% generated, no hand coding was done.

These templates are not currently supported on the same level as the templates that generate the EntitySpaces classes. EntitySpaces will not be bogged down in supporting these or allow them to effect the timing of our 1.5 release which is fundamental to our long term strategy. That being said we will of course address issues over time and fix things as time allows.

See the PDF file that describes the template(s) PDF

posted on Monday, June 05, 2006 10:57:32 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]
 Sunday, June 04, 2006

We have taken our soon to be released ASPX template suite and generated a site against the Microsoft SQL Northwind database. Nothing you will see on this site was hand coded (except for the row of buttons at the top and the URL link at the bottom - both on our master page). The ASP.NET templates are pretty sophisticated and are style sheet driven so please don't get hung up on the color scheme. We realize you probably wouldn't use these pages as your actual website but the ASP.NET pages do provide a nice admin system that sys-admins can use to administer your database and that developers can use during development. They also act as a very nice reference on how to use EntitySpaces in an ASP.NET application.

The EntitySpaces ASP.NET templates support master pages (optional), use the new Multiview/View construct and the GridView, allow for sorting on the header columns, paging, sub grids, editing, searching, and more. We're only a matter of days until they are released at which point all customers will have access to the templates in the download area. The EntitySpaces ASP.NET templates will not be included in the trial version of EntitySpaces. The documentation and demo site of course will be open to everyone.

Take a look http://www.entityspaces.net/thedemo/Employees_admin.aspx

posted on Sunday, June 04, 2006 1:49:34 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]