given my fetch method as follows
#region
Data Access - Fetch List[
Transactional(TransactionalTypes.TransactionScope)] private void DataPortal_Fetch(string filter){
bool cancel = false;OnBLUserEndorsementEmailsFetching(
ref cancel); if (cancel) return; using (var mgr = ContextManager<Pinsoft.Net.DalLinq.PinsoftDataContext>.GetManager(
Globals.PinsoftConnectionString,false)){
RaiseListChangedEvents =
false; if (filter == ""){
this.AddRange( from row in mgr.DataContext.UserEndorsementEmail select BLUserEndorsementEmail.GetBLUserEndorsementEmail(row));
}
else{
this.AddRange( from row in mgr.DataContext.UserEndorsementEmail.Where(filter)
select BLUserEndorsementEmail.GetBLUserEndorsementEmail(row));
}
RaiseListChangedEvents =
true;}
//using
OnBLUserEndorsementEmailsFetched();
}
I am trying to pass the following string as the filter..
"PolicyID = new Guid(\"b5e7a7e0-4e38-4da1-bb6b-9b7a00b0f9c1\")"
but it failing with - "'(' expected"
from what I can see in studying the info on the web for dynamic linq, this should work ..
anyone know what I might be doing wrong?
thanks in advance..
This is not, from what I can see, a CSLA issue. This is about constructing dynamic LINQ queries using LINQ to SQL.
Copyright (c) Marimer LLC