Happy 2006!

Posts   
 
    
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 01-Jan-2006 00:05:52   

From Solutions Design and our support team to all our customers and friends: Happy 2006! smile

Frans Bouma | Lead developer LLBLGen Pro
C4 avatar
C4
User
Posts: 32
Joined: 12-Nov-2005
# Posted on: 01-Jan-2006 01:29:22   

Otis wrote:

From Solutions Design and our support team to all our customers and friends: Happy 2006! smile

Same to you! I look forward to working with LLBLGenPro 2006... Do we have an ETA yet??? stuck_out_tongue_winking_eye

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 01-Jan-2006 12:07:09   

C4 wrote:

I look forward to working with LLBLGenPro 2006... Do we have an ETA yet??? stuck_out_tongue_winking_eye

Not yet. We hope to have done all necessary features by the end of march.

I have a teaser though:


[Test]
public void EntityViewFilteringTestTypedCollection()
{
    using( DataAccessAdapter adapter = new DataAccessAdapter() )
    {
        EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>( new CustomerEntityFactory() );
        adapter.FetchEntityCollection( customers, null );
        EntityView2<CustomerEntity> customersInGermanyView = new EntityView2<CustomerEntity>( customers, (CustomerFields.Country == "Germany"), null );
        Assert.AreEqual( 11, customersInGermanyView.Count );
        for( int i = 0; i < customersInGermanyView.Count; i++ )
        {
            Console.WriteLine( "{0}: CustomerID: {1}. CompanyName: {2}",
                i, customersInGermanyView[i].CustomerId, customersInGermanyView[i].CompanyName );
        }
        EntityView2<CustomerEntity> customersWhichAreOwner = new EntityView2<CustomerEntity>( customers, (CustomerFields.ContactTitle == "Owner"), null );
        Assert.AreEqual( 16, customersWhichAreOwner.Count );
        EntityView2<CustomerEntity> customersInGermanyAndOwnerView = new EntityView2<CustomerEntity>( customers,
                 new PredicateExpression( CustomerFields.Country == "Germany" ).AddWithAnd( CustomerFields.ContactTitle == "Owner" ), null );
        Assert.AreEqual( 1, customersInGermanyAndOwnerView.Count );

        ResultsetViewer20 viewer = new ResultsetViewer20();
        viewer.BindView( customersInGermanyView );
        viewer.ShowDialog( null );

        customersInGermanyAndOwnerView[0].ContactTitle = "Changed";
        Assert.AreEqual( 0, customersInGermanyAndOwnerView.Count );
    }
}

[Test]
public void EntityViewMultiSorting()
{
    using( DataAccessAdapter adapter = new DataAccessAdapter() )
    {
        EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>( new CustomerEntityFactory() );
        adapter.FetchEntityCollection( customers, null );

        ISortExpression sorter = new SortExpression( CustomerFields.Country | SortOperator.Ascending );
        sorter.Add( CustomerFields.ContactTitle | SortOperator.Descending) ;
        sorter.Add( CustomerFields.CustomerId | SortOperator.Ascending );

        EntityView2<CustomerEntity> customersSorted = new EntityView2<CustomerEntity>( customers, sorter );

        ResultsetViewer20 viewer = new ResultsetViewer20();
        viewer.BindView( customersSorted );
        viewer.ShowDialog( null );
    }
}

very raw tests, just to see if it initially works, but as you can see, normal strong typed filters and sorters are usable for creating a view in-memory on an entity collection simple_smile .

Frans Bouma | Lead developer LLBLGen Pro
alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 03-Jan-2006 21:55:38   

GENERICS AND IN MEMORY SORTING!!! FREAKIN COOOOOOOOOOOOOOOOL!

NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 03-Jan-2006 22:01:31   

I agree on the coolness of the possibilites! Very helpful!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 04-Jan-2006 12:59:22   

In-memory sorting already is possible today, with the entitycollection's Sort() overloads wink

Frans Bouma | Lead developer LLBLGen Pro