Using Interfaces with ObjectDataSources

  • Thread starter Thread starter maloney1
  • Start date Start date
M

maloney1

Hello,

I have an ObjectDataSource that returns instances of an interface. The
Select works as expected, but after editing the UI (web) and trying to
save the object I get the following error:


[MissingMethodException: Cannot create an instance of an interface.]


I understand that the save method is obviously not recieving an
instance back from the UI, any suggestions on how to implement an
instance of the Interface, or is there a built in way on an
ObjectDataSource to do this?

Thanks,
John
 
I have an ObjectDataSource that returns instances of an interface. The
Select works as expected, but after editing the UI (web) and trying to
save the object I get the following error:

Can you elaborate on what is the you're trying to save?

IMHO, ObjectDataSource does not support the "Save" method.

To insert a new entry, you may want to have a class that implements the
interface and provides a support for "Insert" method.

Have a look at the properties: "TypeName" and "InsertMethod" of
ObjectDataSource
 
Back
Top