dazinator / CrmAdo

An ADO.NET Provider for Dynamics Crm
6 stars 4 forks source link

Add support for the T-SQL OUTPUT Clause #50

Closed dazinator closed 9 years ago

dazinator commented 9 years ago

The T-SQL output clause can be used to return data from an Insert / Update / Delete.

See: http://msdn.microsoft.com/en-us/library/ms177564.aspx

Let's add support for this T-SQL Output clause, so that it will become possible to do an Insert, Update, Delete command, with an Output clause, and then retrieve the output paramaters from the command for the output data.

This could be really handy for:

  1. Getting the Id and CreatedOn date of new entities, immediately after the Insert.
  2. Getting the ModifiedOn date after an update is made.
  3. Outputting attribute values that may change as a result of synchronous Plugin / Workflows that fire during a Create / Update