示例#1
0
        public static void Delete(int patternId)
        {
            var sql = @"
            DELETE FROM SocketBoxDetailComments
            WHERE PatternId = " + patternId;

            var db = SocketBoxDetailComment.GetDatabase();

            db.ExecuteNonQuery(sql);
        }
示例#2
0
        public static List <SocketBoxDetailComment> Get(int patternId)
        {
            var sql = @"
            SELECT * FROM SocketBoxDetailComments
            WHERE
                PatternId = " + patternId.ToString();

            var db = SocketBoxDetailComment.GetDatabase();

            return(db.ExecuteQuery <SocketBoxDetailComment>(sql));
        }
示例#3
0
        public static void DeleteByCategory(int categoryId)
        {
            var sql = @"
            DELETE FROM SocketBoxDetailComments
            FROM SocketBoxDetailComments C
            JOIN SocketBoxPatternDetails D ON
                C.PatternId = D.PatternId AND C.DetailSeq = D.Seq
            JOIN SocketBoxPatterns P ON D.PatternId = P.Id AND
                P.CategoryId = " + categoryId;

            var db = SocketBoxDetailComment.GetDatabase();

            db.ExecuteNonQuery(sql);
        }