/// <summary>
        /// Compares databas functions if schematicly match each other
        /// </summary>
        /// <param name="masterObjectFunction">Master database function (or left)</param>
        /// <param name="checkedObjectFunction">Checked database function (or right)</param>
        /// <returns>Comparison result</returns>
        public static DbSchemaCompareResult DbCompare(DbObjectFunctionSchema masterObjectFunction, DbObjectFunctionSchema checkedObjectFunction)
        {
            if (masterObjectFunction == null)
            {
                throw new ArgumentNullException(nameof(masterObjectFunction));
            }

            if (checkedObjectFunction == null)
            {
                throw new ArgumentNullException(nameof(checkedObjectFunction));
            }

            //masterObjectFunction.ReturnValues.Sort((l, r) => l.FakeOrderId.CompareTo(r.FakeOrderId));
            //checkedObjectFunction.ReturnValues.Sort((l, r) => l.FakeOrderId.CompareTo(r.FakeOrderId));

            DbSchemaCompareResult result = DbObjectStoredProcedureSchema.DbCompare(masterObjectFunction, checkedObjectFunction);

            foreach (DbObjectParameterSchema fMasterParam in masterObjectFunction.ReturnValues)
            {
                DbObjectParameterSchema fCheckParam = checkedObjectFunction.ReturnValues.FirstOrDefault(p => p.Name == fMasterParam.Name);
                result.InnerResults.Add(DbObjectParameterSchema.DbCompare(fMasterParam, fCheckParam));
            }

            foreach (DbObjectParameterSchema fCheckParam in checkedObjectFunction.ReturnValues)
            {
                DbObjectParameterSchema?fMasterParam = masterObjectFunction.ReturnValues.FirstOrDefault(p => p.Name == fCheckParam.Name);
                if (fMasterParam == null)
                {
                    result.InnerResults.Add(DbObjectParameterSchema.DbCompare(null, fCheckParam));
                }
            }

            return(result);
        }
        /// <summary>
        /// Compares database stored procedures if schematicly match each other
        /// </summary>
        /// <param name="masterSp">Master database stored procedure (or left)</param>
        /// <param name="checkedSp">Checked database stored procedure (or right)</param>
        /// <returns>Comparison result</returns>
        public static DbSchemaCompareResult DbCompare(DbObjectStoredProcedureSchema masterSp, DbObjectStoredProcedureSchema checkedSp)
        {
            if (masterSp == null)
            {
                throw new ArgumentNullException(nameof(masterSp));
            }

            if (checkedSp == null)
            {
                throw new ArgumentNullException(nameof(checkedSp));
            }

            DbSchemaCompareResult result = DbObjectTriggerSchema.DbCompare(masterSp, checkedSp);

            CompareCollection(result, masterSp.Parameters, checkedSp.Parameters, (left, right) => string.Equals(left.Name, right.Name, StringComparison.Ordinal),
                              DbObjectParameterSchema.DbCompare);

            return(result);
        }