/// <summary>
        /// Convert a nettiers collection to the ws proxy collection.
        /// </summary>
        public static Nettiers.AdventureWorks.Entities.BillOfMaterials Convert(Nettiers.AdventureWorks.Entities.BillOfMaterials outItem, WsProxy.BillOfMaterials item)
        {
            if (item != null && outItem != null)
            {
                outItem.BillOfMaterialsId = item.BillOfMaterialsId;
                outItem.ProductAssemblyId = item.ProductAssemblyId;
                outItem.ComponentId       = item.ComponentId;
                outItem.StartDate         = item.StartDate;
                outItem.EndDate           = item.EndDate;
                outItem.UnitMeasureCode   = item.UnitMeasureCode;
                outItem.BomLevel          = item.BomLevel;
                outItem.PerAssemblyQty    = item.PerAssemblyQty;
                outItem.ModifiedDate      = item.ModifiedDate;

                outItem.AcceptChanges();
            }

            return(outItem);
        }
        /// <summary>
        ///     Update an existing row in the datasource.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="entity">Nettiers.AdventureWorks.Entities.BillOfMaterials object to update.</param>
        /// <remarks></remarks>
        /// <returns>Returns true if operation is successful.</returns>
        public override bool Update(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.BillOfMaterials entity)
        {
            WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
            proxy.Url = Url;

            try
            {
                WsProxy.BillOfMaterials result = proxy.BillOfMaterialsProvider_Update(Convert(entity));
                Convert(entity, result);
                entity.AcceptChanges();
                return(true);
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }