This post originated from an RSS feed registered with .NET Buzz
by Christian Horsdal.
Original Post: A Pinch of Functional in my C# - An Everyday Example
Feed Title: Horsdal
Feed URL: http://www.horsdal-consult.dk/feeds/posts/default
Feed Description: A blog that will be about code, architecture, design, and .NET.
I'm working on a codebase that, like many other code bases, has a number of data access objects(DAOs) that all inherit a common superclass. The other day I got tired of looking this pattern of code repeated a lot in the DAOs:
1 public MyDTO GetMyDTO(...)
2 {
3 DataContext DB = NewDBContext;
4 try
5 {
6