I started looking into how I might 'cast' or convert a DataTable (that you *know* came from a specific TypedView) back into an instance of the TypedView without duplicating it.
You can do it as follows:
MyStuffTypedView tv = new MyStuffTypedView();
DataTable dt = client.GetAnExternalDataTable();
This is obviously cloning the returned one as opposed to 'wrapping' it, but I presume this is the only option as TypedViews inherit from DataTable rather than referencing them.
I'm looking at this as a simple way of returning tables of data from WebService calls. There's not much in the help about TypedViews over WCF/SOAP, so is there a better or 'more correct' way to do this?
I know that a DataSet is sometimes not the most efficient data object due to all the metadata included, but the simplicity of having LLBLGen's object wrap it saves Fields*Views*x lines of hand-written code in each project and retains the nice custom additions and properties in the Adapter client code.
I suppose we could write a template to generate 'lightweight' objects to pass around for views, but as these would typically be in the same project as our TypedView object it seems a bit pointless