eggie5 wrote:
I somehow need to get the names of deriving class' public fields. Reflection?
Yep, reflection would be the way to get the data. Custom attributes would come in handy too:
class Person
{
[Column("AgeColumn")]
public int Age;
}
Where TableFieldName is a custom attribute. Those may come in handy to get the corresponding table or column for a class or field. As the other poster noted, there are a lot of data access layers out there that do this. In the upcoming .NET 3.5, you'll have built-in support for this in the form of LINQ (language integrated query), and it's extension of LINQ-to-SQL and other databases. See Scott Guthrie's blog post on LINQ to SQL[^] for more info.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Minnesota Bridge Collapses The apostle Paul, modernly speaking: Epistles of Paul Judah Himango