I wonder...

Posts   
 
    
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 08-Jul-2005 05:58:15   

I find that the most painstaking part of writing distributed code using LLBLGen is creating the server-side data retrieval objects (see below):

        public EntityCollection GetAllCatalogueDetailCategoryList()
        {
            EntityCollection lst = new EntityCollection(new CatalogueDetailCategoryEntityFactory());
            DataAccessAdapter adapter = new DataAccessAdapter();

            IPrefetchPath2 prefetchPath = new PrefetchPath2((int)EntityType.CatalogueDetailCategoryEntity) ;
            prefetchPath.Add(CatalogueDetailCategoryEntity.PrefetchPathCatalogueDetailSubCategories) ;

            IRelationPredicateBucket bucket = new RelationPredicateBucket();
            ISortExpression sorter = new SortExpression(SortClauseFactory.Create(CatalogueDetailCategoryFieldIndex.Description, SortOperator.Ascending));
            sorter.Add(SortClauseFactory.Create(CatalogueDetailSubCategoryFieldIndex.Description, SortOperator.Ascending)) ;
            adapter.FetchEntityCollection(lst, bucket, 0, sorter, prefetchPath);
            return lst;
        }

And while I appreciate the power that all these clauses provide us as developers, I'm wondering if it's possible to develop some kind of UI to do it... or perhaps teach TemplateStudio to do it.

I wonder...

Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 08-Jul-2005 08:22:33   

Soon, with operator overloading you'll be able to write that in a much easier intuitive way. At least in C# in .NET 1.x. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 08-Jul-2005 14:03:21   

Otis wrote:

Soon, with operator overloading you'll be able to write that in a much easier intuitive way. At least in C# in .NET 1.x. simple_smile

What would operator overloading allow us to do in this case?

netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 08-Jul-2005 14:46:58   

Jeff wrote:

What would operator overloading allow us to do in this case?

See this post - http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3460

Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 08-Jul-2005 17:51:53   

netclectic wrote:

Jeff wrote:

What would operator overloading allow us to do in this case?

See this post - http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3460

Ah... I see. Thanks.