public CrmTransaction()
 {
     this.trans = new Microsoft.Xrm.Sdk.Messages.ExecuteTransactionRequest
     {
         Requests        = new Microsoft.Xrm.Sdk.OrganizationRequestCollection(),
         ReturnResponses = false
     };
 }
 public void Commit(Entities.IUnitOfWork uow)
 {
     if (trans.Requests != null && trans.Requests.Count > 0)
     {
         uow.Execute(trans);
         this.trans = new Microsoft.Xrm.Sdk.Messages.ExecuteTransactionRequest
         {
             Requests        = new Microsoft.Xrm.Sdk.OrganizationRequestCollection(),
             ReturnResponses = false
         };
     }
 }
 public void Commit(Microsoft.Xrm.Sdk.IOrganizationService orgService)
 {
     if (trans.Requests != null && trans.Requests.Count > 0)
     {
         orgService.Execute(trans);
         this.trans = new Microsoft.Xrm.Sdk.Messages.ExecuteTransactionRequest
         {
             Requests        = new Microsoft.Xrm.Sdk.OrganizationRequestCollection(),
             ReturnResponses = false
         };
     }
 }