You can edit almost every page by Creating an account. Otherwise, see the FAQ.

EntitySpaces

From EverybodyWiki Bios & Wiki

EntitySpaces
Developer(s)EntitySpaces, LLC
Stable release
EntitySpaces 2012.1.0930.0 / 4 October 2012
Written inC#
Engine
    Operating systemCross-platform
    Platform.NET 3.5+ and Mono
    TypeObject-relational mapping
    LicenseModified BSD License
    Websitehttp://www.entityspaces.net

    Search EntitySpaces on Amazon.

    EntitySpaces is an object-relational mapping tool, whose architecture can be used when writing an ASP.NET, .NET Framework or .NET Compact Framework application. The architecture is provider independent, allowing developers to run the same binary code against any of the supported databases. EntitySpaces works with both C# and VB.NET and uses no reflection and no XML files.

    Although EntitySpaces targets both ASP.NET and Windows.Forms projects, DotNetNuke module developers can use the architecture as an alternative to the DotNetNuke DAL. Many of the features listed below, including important ones like transactions, are not available when using the DotNetNuke DAL API.

    History[edit]

    EntitySpaces, LLC[edit]

    On January 18, 2006 a filing was made for the formation of "EntitySpaces, LLC", a limited liability company. On January 23, 2006 EntitySpaces, LLC officially became a legal entity. In February, EntitySpaces, LLC put together a commercial offering for the EntitySpaces .NET architecture.

    On September 21, 2012, EntitySpaces announced they would dissolve on December 31, 2012 and their products would transition to open source.[1]

    Doodads[edit]

    The dOOdads .NET Architecture was created by Mike Griffin[2] and, in many ways, is the progenitor of EntitySpaces. During the dOOdads architecture development and evolution, a lot was learned from the community, much of which has made its way into EntitySpaces.[3]

    The dOOdads architecture is written natively in both C# and VB.NET. The dOOdads .NET architecture also comes with MyGeneration templates that generate native C# or VB.NET dOOdad classes.

    The EntitySpaces binaries are written in C#. Templates are available to generate both C# and VB.NET concrete and abstract classes, so EntitySpaces is fully supported for both languages, but native VB.NET binaries are not provided.[4]

    Providers Available[edit]

    EntitySpaces Features[edit]

    Feature Description
    Mono Support[7][8] Runs MySQL and VistaDB under Mono.
    Compact Framework Support In version 1.6.0 and onwards,[9] EntitySpaces incorporated full support for Microsoft's .NET Compact Framework, the incorporatation SQL CE and VistaDB Database support for Mobile/CE applications.
    Medium Trust Support Allows the use of zero reflection through the use of a Medium Trust Loader, and works in any environment.
    Design Time Data Binding[10] Has design time data binding support for grids, detail forms, and other controls in ASP.NET.
    Hierarchical Data Models The EntitySpaces Hierarchical Template uses the foreign keys in a database to automatically build the hierarchical object model.
    Dynamic Query API Straightforw

    Examples[edit]

    The following are examples of using EntitySpaces with the Northwind Database.

    Querying a Collection[edit]

    This sample loads all Employees whose last name starts with “Smi”.

    EmployeesCollection coll = new EmployeesCollection(); 
    coll.Query.Where(coll.Query.LastName.Like("Smi%")); 
    if(coll.Query.Load()) 
    { 
        foreach (Employees emp in coll) 
        { 
            Console.WriteLine(emp.LastName); 
        } 
    }
    

    Saving a Collection[edit]

    Here the Employees are being transferred to Indianapolis. You never call Save on the single entity when it lives in a collection. Save will commit all modified, added, and deleted rows.

    EmployeesCollection coll = new EmployeesCollection(); 
    if(coll.LoadAll()) 
    { 
        foreach (Employees emp in coll) 
        { 
            emp.City = "Indianapolis"; 
        } 
        coll.Save(); 
    }
    

    Adding new records through a Collection[edit]

    Here two new Employees are being added and saved.

    EmployeesCollection coll = new EmployeesCollection(); 
     
    Employees emp = coll.AddNew(); 
    emp.FirstName = "Joe"; 
    emp.LastName = "Smith"; 
     
    emp = coll.AddNew(); 
    emp.FirstName = "Sue"; 
    emp.LastName = "Smith"; 
     
    coll.Save();
    

    Deleting a record through a Collection[edit]

    This example demonstrates the use of FindByPrimaryKey to locate a particular Employee in the collection, then marks it as deleted, and finally saves the collection.

    EmployeesCollection coll = new EmployeesCollection(); 
    coll.LoadAll(); 
     
    Employees emp = coll.FindByPrimaryKey(41); 
    if(emp != null) 
    { 
        emp.MarkAsDeleted(); 
        coll.Save(); 
    }
    

    If you need to delete all of the records from a table, you use the MarkAllAsDeleted method as follows:

    EmployeesCollection coll = new EmployeesCollection(); 
    coll.MarkAllAsDeleted(); 
    coll.Save();
    

    See also[edit]

    References[edit]

    1. "EntitySpaces to Shutdown, Move to Open Source". Retrieved 28 September 2012.
    2. EntitySpaces on .Net Rocks
    3. EntitySpaces Architecture History
    4. EntitySpaces On Kevin Southworths Blog
    5. PostgreSQL Support
    6. VistaDB Homepage
    7. EntitySpaces Mono Support #1
    8. EntitySpaces Mono Support #2
    9. EntitySpaces Goes Mobile
    10. Design Time Binding Support

    External links[edit]


    This article "EntitySpaces" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.