Ejemplo n.º 1
0
        public void ExistsQueryTest()
        {
            var p = new CMSProperties(_database);

            p.SaveProperty(Test01Name, Test01Value);
            var b = _database.ExistsQuery("SELECT Property FROM Properties LIMIT 1");

            Assert.AreEqual(b, true);
            b = _database.ExistsQuery($"SELECT Property FROM Properties WHERE Value='{Guid.NewGuid()}' LIMIT 1");
            Assert.AreEqual(b, false);
        }
Ejemplo n.º 2
0
 public bool PropertyExists(string propertyName)
 {
     try
     {
         return(_database.ExistsQuery($"SELECT Property FROM Properties WHERE Property = '{propertyName}'"));
     }
     catch (Exception ex)
     {
         Log.Error(ex);
         return(false);
     }
 }