/// <summary>
        /// Handles checking for stored procedures with name starting with 'sp_;
        /// </summary>
        /// <param name="database">Database to examine</param>
        /// <param name="warningList">List to add to if issues found</param>
        private void checkForNameStartingWithSpUndercoreWarning(Database database, ref List<DesignIssueWarning> warningList)
        {
            if (database == null || !database.Schemas.HasAny())
            {
                return;
            }

            var problems = (
                    from schema in database.Schemas
                    from sproc in schema.StoredProcedures
                    where sproc.ObjectName.StartsWith("sp_", StringComparison.OrdinalIgnoreCase)
                    select sproc as IDbObject
                ).ToList();

            if (problems.HasAny())
            {
                DesignIssueWarning sprocNameWarning = new DesignIssueWarning()
                {
                    Description = "Stored Procedures with name staring with 'sp_' are not recommended",
                    ReferenceUrl = new Uri("https://msdn.microsoft.com/en-us/library/ms190669(v=sql.105).aspx"),
                    DatabaseObjects = problems
                };

                warningList.Add(sprocNameWarning);

            }
        }
        private DesignIssueWarning getDesignIssueWarningForObjectNamedWithReservedWordssignIssueWarning(Model.Database database)
        {
            DesignIssueWarning warning = new DesignIssueWarning()
            {
                Description = "Database object names should not be reserved words",
                ReferenceUrl = new Uri("https://msdn.microsoft.com/en-us/library/ms189822(SQL.100).aspx")
            };

            if (database == null)
            {
                return null; //cannot act on empty object
            }

            List<IDbObject> objectList = new List<IDbObject>();

            if (this.reservedWords.Contains(database.ObjectName, StringComparer.OrdinalIgnoreCase))
            {
                objectList.Add(database as IDbObject);
            }

            IList<IDbObject> allDbObjList = database.GetAllObjects();

            // union objects to one collection to get one list to parse
            var nameViolations = (
                    from obj in allDbObjList
                    where this.reservedWords.Contains(obj.ObjectName, StringComparer.OrdinalIgnoreCase)
                    orderby obj.ObjectFullDisplayName
                    select obj
                ).ToList();

            objectList.AddRange(nameViolations);

            //do we have any objects?
            if (objectList.HasAny())
            {
                warning.DatabaseObjects = objectList;
            }
            else
            {
                warning = null;
            }

            return warning;
        }
        private DesignIssueWarning getDesignIssueForObjectsWithSpecialCharactersInName(Model.Database database)
        {
            DesignIssueWarning warning = new DesignIssueWarning()
            {
                Description = "Database object names should not contain special characters",
                ReferenceUrl = new Uri("https://msdn.microsoft.com/en-us/library/dd172134(v=vs.100).aspx")
            };

            if (database == null)
            {
                return null; //cannot act on empty object
            }

            List<IDbObject> objectList = new List<IDbObject>();

            // check Db name
            if (this.checkForSpecialCharacters(database.ObjectName))
            {
                objectList.Add(database);
            }

            IList<IDbObject> allDbObjList = database.GetAllObjects();

            foreach (IDbObject obj in allDbObjList)
            {
                if (this.checkForSpecialCharacters(obj.ObjectName))
                {
                    objectList.Add(obj);
                }
            }

            //do we have any objects?
            if (objectList.HasAny())
            {
                warning.DatabaseObjects = objectList;
            }
            else
            {
                warning = null;
            }

            return warning;
        }