DataPortal_Create Failing

DataPortal_Create Failing

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


Smeat posted on Monday, July 24, 2006

Hi

I have a class called DiaryEntry declare as follows:

public abstract class DiaryEntry : BusinessBase<DiaryEntry>

I also have a class called Task (and several others) that inherit from Diary:

public class Task : DiaryEntry

I only wish to inherit behavior so all data access code is within the DiaryEntry class. My problem is that the framework doesn't seem to recognise this when call the DataPortal_xxx methods.

When I create a new Task object, the framework is calling the DataPortal_Create method in BusinessBase instead of in the DiaryEntry class.

Just for fun I also tried placing the DataPortal_Create method within my Task object but the result was the same.

Is this a limitation of the framework? If so, is there a way to work around this?

TIA

Smeat

Smeat replied on Monday, July 24, 2006

I should have searched the forum before posting my question.

The following link shows how to get around this:

http://forums.lhotka.net/forums/thread/3033.aspx

Not an ideal solution but Rocky's response explains why the criteria parameter has to be declared as type object.

Smeat

Copyright (c) Marimer LLC