This question is locked. New answers and comments are not allowed.
Dear all,
I have successfully implemented the Fetchplan using OA ORM as follows:
Define the Include & association on the member at the metaclass as follows:
then create the method to implement the FetchPlan as follows:
In the SL client I have two QueryableDomainServiceCollectionView to hold the data back from the GetSummaryWithDetails as follows:
but the second line is not working .. what is the problem with the cast here ...
Also, I would like to know If my implementation of the FetchPlan is correct ...
Regards
I have successfully implemented the Fetchplan using OA ORM as follows:
Define the Include & association on the member at the metaclass as follows:
[Include]
[Association(
"summaryChildren"
,
"number"
,
"number"
)]
public
IList<detail> details {
get
;
private
set
; }
then create the method to implement the FetchPlan as follows:
public
dailysummery GetSummaryWithDetails(
decimal
number,
int
id)
{
FetchStrategy summaryfs =
new
FetchStrategy();
summaryfs.LoadWith<summery>(s=>s.details);
DataContext.FetchStrategy = summaryfs;
dailysummery summary = (from dsummery
in
DataContext.summeries
where dsummery.number == number
&& dsummery.id == id
select dsummery).SingleOrDefault();
return
summary;
}
In the SL client I have two QueryableDomainServiceCollectionView to hold the data back from the GetSummaryWithDetails as follows:
CurrentSummary = DS.GetSummaryWithDetails(1,2);
CurrentDetails = CurrentSummary.details.AsQueryable()
as
QueryableDomainServiceCollectionView<detail>;
but the second line is not working .. what is the problem with the cast here ...
Also, I would like to know If my implementation of the FetchPlan is correct ...
Regards