/// <inheritdoc/>
        /// <remarks>Consults each <see cref="OtherDependencyFinders"/> for CASCADE logic then deletes any <see cref="AnyTableSqlParameter"/> declared
        /// on the deleted object</remarks>
        /// <param name="oTableWrapperObject"></param>
        public void HandleCascadeDeletesForDeletedObject(IMapsDirectlyToDatabaseTable oTableWrapperObject)
        {
            foreach (IObscureDependencyFinder obscureDependencyFinder in OtherDependencyFinders)
            {
                obscureDependencyFinder.HandleCascadeDeletesForDeletedObject(oTableWrapperObject);
            }

            //Delete any SQLFilterParameters associated with the parent object (which has just been deleted!)
            if (AnyTableSqlParameter.IsSupportedType(oTableWrapperObject.GetType()))
            {
                foreach (var p in _repository.GetAllParametersForParentTable(oTableWrapperObject))
                {
                    p.DeleteInDatabase();
                }
            }
        }
Esempio n. 2
0
 /// <inheritdoc/>
 public ISqlParameter[] GetAllParameters()
 {
     return(_catalogueRepository.GetAllParametersForParentTable(this).ToArray());
 }