For those using the CrmSvcUtil.exe tool to generate entity classes and service context. You can use this simple class to wrap your actions and return your desired result:

More information on using the developer extensions at http://msdn.microsoft.com/en-us/library/gg695790.aspx