Data adapters

  • Thread starter Thread starter Dathan
  • Start date Start date
D

Dathan

I'm using some table adapters that were auto-generated by the Visual
Studio data set designer. I'm trying to use partial classes to make
them expose a common set of functionality so I can track them using
generics (I don't believe I can use a common base class because I want
to expose a Fill(DataTable) method, the implementation of which will
vary by class). So I create a partial class for each one, have it
derive from my interface (interface ISomeInterface{int Fill
(System.Data.DataTable); int Update(System.Data.DataTable)), and
implement the two methods just fine. Everything compiles. However,
when I try to use ISomeInterface to refer to my table adapters, I get
"cannot convert from someTableTableAdapter to ISomeInterface". Where
am I going wrong?
 
I'm using some table adapters that were auto-generated by the Visual
Studio data set designer.  I'm trying to use partial classes to make
them expose a common set of functionality so I can track them using
generics (I don't believe I can use a common base class because I want
to expose a Fill(DataTable) method, the implementation of which will
vary by class).  So I create a partial class for each one, have it
derive from my interface (interface ISomeInterface{int Fill
(System.Data.DataTable); int Update(System.Data.DataTable)), and
implement the two methods just fine.  Everything compiles.  However,
when I try to use ISomeInterface to refer to my table adapters, I get
"cannot convert from someTableTableAdapter to ISomeInterface".  Where
am I going wrong?

can you post some of your code?
with the class header is fine I guess

Also , have you try Linq to SQL?
 
can you post some of your code?
with the class header is fine I guess

Also , have you try Linq to SQL?

I figured it out. Stupid mistake on my part. I just didn't put my
partial class implementation in the right namespace. Doh! Thanks for
the response, though.
 
Back
Top