This question is locked. New answers and comments are not allowed.
I am running OpenAccess Q3 2010 and am running into this error. I had it working with SQL to Linq and then with Entity Framework. Is there a work around for something like this with OpenAccess?
This is the code. It is running the code underneath the if part of the statement.
This is the error:
Here is the inner exception:
"Execution of 'DataObjects.EntityMapper.Mapper:ToBusinessObject(LossSaver)' on the database server side currently not implemented."
The method ToBusinessObject accepts a CollectionsContext.LossSavers.LossSaver object and creates a data model class, just a conversion method. Maybe I just need to think about the error and understand what it is saying but I wanted to get this out here in case someone can point out what is happening.
using
(CollectionsContext db =
new
CollectionsContext())
{
IQueryable<LossSaver> query = db.LossSavers;
if
(reportDate.Equals(DateTime.MinValue))
{
query = query.Where(q => q.Status == theStatus)
.OrderBy(q => q.MemberNumber);
}
else
{
query = query.Where(q => q.Status == theStatus)
.Where(q => q.ReportDate.Value.Month == reportDate.Month)
.Where(q => q.ReportDate.Value.Year == reportDate.Year)
.OrderBy(q => q.MemberNumber);
}
return
query.Select(q => Mapper.ToBusinessObject(q)).ToList();
}
This is the code. It is running the code underneath the if part of the statement.
This is the error:
An exception occured during the execution of '
Extent<DataObjects.LossSaver>.Where(q => (q.Status = value(DataObjects.LossSaverDao+<>c__DisplayClass0).theStatus)).OrderBy(q => q.MemberNumber).Select(q => ToBusinessObject(q))'. See InnerException
for
more details.
Here is the inner exception:
"Execution of 'DataObjects.EntityMapper.Mapper:ToBusinessObject(LossSaver)' on the database server side currently not implemented."
The method ToBusinessObject accepts a CollectionsContext.LossSavers.LossSaver object and creates a data model class, just a conversion method. Maybe I just need to think about the error and understand what it is saying but I wanted to get this out here in case someone can point out what is happening.