G
Guest
Hi;
I am writing a class that implements IDbConnection. The i/f defines a method
BeginTransaction() that returns an IDbTransaction. I want to define this as
returning a DbTransaction (as DbConnection does). It makes sense to me that
this is legal as DbTransaction implements IDbTransaction so it does meet the
contract of returning an IDbTransaction.
But it won't compile - how do I get this to work? There must be a way as
DbConnection does it.
I tried explicit/implicit but got an error message saying that could only be
used with operators.
I am writing a class that implements IDbConnection. The i/f defines a method
BeginTransaction() that returns an IDbTransaction. I want to define this as
returning a DbTransaction (as DbConnection does). It makes sense to me that
this is legal as DbTransaction implements IDbTransaction so it does meet the
contract of returning an IDbTransaction.
But it won't compile - how do I get this to work? There must be a way as
DbConnection does it.
I tried explicit/implicit but got an error message saying that could only be
used with operators.