CSLA .NET

From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books

CslaXML.cst problem with EntitySetName for child collections

rated by 0 users
This post has 0 Replies | 0 Followers

Not Ranked
Points 80
nampord Posted: Tue, Mar 3 2009 5:07 AM

Hi

I wonder if there is a bug in these templates or if it is due to my lack of understanding:

The example template CslaXML.cst together with the MySample.xml does not produce the expected output:

the MySample.xml states for the Project object

<Property Name="Resources" Type="ProjectResources" EntitySetName="Assignments" Default="ProjectResources.NewProjectResources()" IsChildCollection="true"/>

But the Fetch in the  ProjectResources class is created with

private void Fetch(IEnumerable<Dal.ProjectResources> dataSet)

I would expect that the EntitySetName (i.e. Assignments) would apprear as the Dal dataset property and not the type of the child collection (i.e. not ProjectResources); What would the EntitySetName be good for otherwise?

In fact looking at the TemplateBase.cs it looks like that the Dal  dataset  is always set to the type of the childcollection !?

Has anyone ever thoroughly tested  the CslaXml.cst?

I am using the 3.6 templates on csla 3.6.1

Thanks

Frank

  • | Post Points: 5
Page 1 of 1 (1 items) | RSS

Please contact Magenic for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems