public static void Delete(int patternId)
        {
            var sql = @"
            DELETE FROM SocketBoxPatternDetails
            WHERE PatternId = " + patternId;

            var db = SocketBoxPatternDetail.GetDatabase();

            db.ExecuteNonQuery(sql);
        }
        public static List <SocketBoxPatternDetail> Get(int patternId)
        {
            var sql = @"
            SELECT * FROM SocketBoxPatternDetails
            WHERE
                PatternId = " + patternId.ToString();

            var db = SocketBoxPatternDetail.GetDatabase();

            return(db.ExecuteQuery <SocketBoxPatternDetail>(sql));
        }
        public static void DeleteByCategory(int categoryId)
        {
            var sql = @"
            DELETE FROM SocketBoxPatternDetails
            FROM SocketBoxPatternDetails D
            JOIN SocketBoxPatterns P ON D.PatternId = P.Id AND
                P.CategoryId = " + categoryId;

            var db = SocketBoxPatternDetail.GetDatabase();

            db.ExecuteNonQuery(sql);
        }