Reputation: 63
I work with a ASP.NET UI framework that pulls fields for a particular screen off a database. These fields can be associated with particular data fields in another database for binding. The idea with this setup is that if a client needs a new column on a table, they can easily add it, and create a UI field that binds to it without any sort of application restart or recompile.
The problem I've always had with this is that it has meant I'm always having to work with untyped datasets in my code. Are there any ORM libraries for .NET out there that could easily accommodate the requirement of being able to access arbitrary columns in the table schema over and above ones mapped to strongly typed fields?
Upvotes: 2
Views: 80
Reputation: 180787
This looks interesting:
MicroORM - A Dynamically Typed ORM for VB and C#
http://www.infoq.com/articles/MicroORM
The author needed a way to handle datasets returned from stored procedures, where the number of columns returned can vary.
Most ORM's generate a horrendous amount of boilerplate code to mimic the tables in an object-oriented way. Dynamic binding in C# 4.0 allows you to defer resolution of the class members to runtime, so all that boilerplate code is no longer required.
Upvotes: 1