Trying to pass a criteria into CslaDataProvider

Trying to pass a criteria into CslaDataProvider

Old forum URL: forums.lhotka.net/forums/t/7011.aspx


HogBoss posted on Wednesday, May 27, 2009

I'm using Csla 3.6 in .net 3.5 on a WPF project.  I have a data provider that is trying to call a factory method that needs a criteria as a parameter.  My issue is that I do not seem to figure out the syntax for this.

Here is my code:

-XAML-

<csla:CslaDataProvider x:Key="TemplateBind"

ObjectType="{x:Type blib:StandardTemplate}"

FactoryMethod="GetStandardTemplate"

IsAsynchronous="False"

ManageObjectLifetime="True"

>

<csla:CslaDataProvider.FactoryParameters>

<blib:StandardTemplateCriteria>

<StandardTemplateCriteria.uniqHandle>0000-0000-0000-0000</StandardTemplateCriteria.uniqHandle>

</blib:StandardTemplateCriteria>

</csla:CslaDataProvider.FactoryParameters>

-Factory Method Signature-

private void DataPortal_Fetch(StandardTemplateCriteria criteria)

{ .... }

-StandardTemplateCriteria Signature-

public StandardTemplateCriteria(Guid? uniqHandle)

{ ....}

 

I'm getting the error that uniqHandle is not found in type StandardTemplateCriteria.  I can add the factory parameter in the code behind but I was hoping you guys might be able to show me how to do this in XAML.

 

Thanks

HogBoss replied on Friday, May 29, 2009

No one knows?  I guess I will stick to the code behind work around

zhengokusa replied on Friday, May 29, 2009

As I know, you just CANNOT put parameter to dataprovider in XMAL.  

Copyright (c) Marimer LLC