Gal Segal's Blog

Thoughts of a programmer with a soul

Posts Tagged ‘utilities’:

Aug 30

Object Mapper Extension Method

Tags: ,

sunflower by pforty

Many times I need a small piece of code that will help me map one object to another. I see it a lot when dealing with view models : taking a business object and modeling it to serve the needs of the presentation layer.
So I came up with a simple extension method:

Continue reading...
Aug 22

My DAL Base Class

Tags: ,


A few days ago I wrote a small base class for the DAL layer. There are some repeating tasks involving the action of getting/setting data from a database: creating a command, establishing connection, reading the data and disposing everything in the end. In this base class I try to hide these actions and leave the programmer to deal with the important stuff.

Continue reading...