public static void Delete(int patternId) { var sql = @" DELETE FROM SocketBoxDetailComments WHERE PatternId = " + patternId; var db = SocketBoxDetailComment.GetDatabase(); db.ExecuteNonQuery(sql); }
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)); }
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); }