Beispiel #1
0
 public T ExecuteScalar<T>(string sql, object parameters = null)
 {
     try
     {
         return connection.ExecuteScalar<T>(sql, parameters);
     }
     catch (DbException exception)
     {
         throw UpgraderException.CannotExecuteStatement(sql, parameters, exception);
     }
 }
Beispiel #2
0
 public IEnumerable<dynamic> Query(string sql, object parameters = null)
 {
     try
     {
         return connection.Query(sql, parameters);
     }
     catch (DbException exception)
     {
         throw UpgraderException.CannotExecuteStatement(sql, parameters, exception);
     }
 }
Beispiel #3
0
 public void Execute(string sql, object parameters = null)
 {
     try
     {
         connection.Execute(sql, parameters);
     }
     catch (DbException exception)
     {
         throw UpgraderException.CannotExecuteStatement(sql, parameters, exception);
     }
 }