I'm sure I'm missing something easy but I can't figure out what.
I have implimented a simple NameValueListBase.
public class TaskServerList : NameValueListBase<int, string>
When I use the regular criteria class everything works properly and DataPortal_Fetch is called.
_list = DataPortal.Fetch<TaskServerList>(new Criteria(typeof(TaskServerList)));
However when I try to use my custom criteria class I get an error message "DataPortal_Fetch method call failed".
_list =
DataPortal.Fetch<TaskServerList>(new TaskServerCriteria(typeof(TaskServerList)));Here is my criteria class, pretty basic, just this and then a couple getters and setters.
public class TaskServerCriteria : Csla.CriteriaBase
public TaskServerCriteria(Type collectionType) : base(collectionType)
How did you declare the overload of DataPortal_Fetch?
Also, what does the InnerException and/or BusinessException from your DataPortalException contain? That's where you'll find more interesting and useful exception details.
Thanks for pointing me in the right direction. My DataPortal_Fetch was declared as:
private
void DataPortal_Fetch(Criteria criteria)and the inner most exception was "Invalid operation - fetch not allowed". I changed my declaration to:
private
void DataPortal_Fetch(TaskServerCriteria criteria)Now everything works great. Thanks.
Copyright (c) Marimer LLC