95% of my interaction with my database is in C# or C++/cli, but there are a few cases where having a native class to manipulate would be really nice. Of course, I could make it by hand, but that doesn't necessarily keep it up to date. What I'm envisioning is something like
//classname.h
namespace Foo
{
class ClassNameNative
{
int id;
std::string textfield;
double value;
}
}
//classname_marshall.cpp
namespace Foo
{
//insert various marshalling functions here
void Marshal(ClassNameNative const& native, ClassNameEntity^ cli)
{
Marshall(cli->id, native.id);
Marshall(cli->textfield, native.textfield);
Marshall(cli->value, native.value);
}
}
I've only looked briefly, but I think the main thing I'd be missing here is typenames to use for native. I couldn't connect to the svn repository for some reason, has anyone done any work on this area?
Thanks,
Tom