Пример #1
0
 public static void Add(SqlScript script)
 {
     using (var q = new SqlStatement("INSERT INTO RevisionLog (name) VALUES (@name)"))
     {
         q.AddParameter("@name", script.Name);
         q.ExecuteNonQuery();
     }
 }
Пример #2
0
        public static bool ContainsRevision(SqlScript script)
        {
            CreateRevisionLogTable();

            using (var q = new SqlStatement("SELECT COUNT(*) FROM RevisionLog WHERE name=@name"))
            {
                q.AddParameter("@name", script.Name);
                return((int)q.ExecuteScalar() > 0);
            }
        }