Covariant Return on <blah>Command in DataAdapters

J

jehugaleahsa

Hello:

Does anyone know how library implementors are writing Adapters so that
the UpdateCommand, InsertCommand, SelectCommand and DeleteCommand
properties are returning their library Specific command classes?

I am currently writing my own library and would like to emulate. Help?

FYI, my adapter is meant to hide which library I am using underneathe
(Oracle, MS Sql, MySql) without losing the ability to detect
RowUpdating/RowUpdated events and some of the other not-so-vendor-
specific members. Does anyone have any clue whether the current
interface structure is made for this? Without having DataAdapter or
DbDataAdapter as a base class, there is nothing helping out. I am
currently using IDbDataAdapter.

Thanks,
Travis
 
J

Jon Skeet [C# MVP]

Does anyone know how library implementors are writing Adapters so that
the UpdateCommand, InsertCommand, SelectCommand and DeleteCommand
properties are returning their library Specific command classes?

Explicit interface implementation, basically. I've got to nip off to
make the dinner now, so don't have time to go into details, but
hopefully that'sll help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top