search on ORM tools for .NET. Entity Framework is one. NHibernate is another popular one. There are other 3rd party frameworks as well. They all have their strengths and weaknesses. In my view, they all try to do too much and lock you into a framework architecture that "they" like rather than just focus on enabling you to have great .NET code written for you instead of handwriting it all yourself.
I also do not feel they do a good job of separating the datacontract or data container from methods/logic run against those containers. Not an optimum solution if you transporting those data containers all over the place and in different client contexts and environments.
I wrote my own tool to do this sort of thing. Gives me the power to highly tweak its output to give me clean, lean, and mean code.