Skip to content

Object to table mapping

fishpi edited this page Sep 13, 2010 · 2 revisions

LINQ Wrapper incorporates a simple set of attributes for mapping class members to elements in a result set. This doesn’t provide full object-relational mapping capabilities since it doesn’t build queries for you (writing SQL queries yourself being the whole point of LINQ Wrapper). However, it does take care of the other half of the process, populating members on the objects when results have been returned.

The object to table mapping is a minimal library that has been developed ad hoc, and is focused on getting the job done without interfering with SQL. It relies to a certain extent on convention in writing SQL queries, so that each member is always referred to by the same name when it is mentioned in the SELECT clause. The SQL builder aids in this by providing a method that will auto-generate a SELECT clause with the correct fields named in the correct way; this can be overridden manually, but it is rarely useful to do so.

Clone this wiki locally