public object ExecuteScalar (string sql) { using (IDbCommand cmd = CreateCommand ()) { cmd.CommandText = sql; return cmd.ExecuteScalar (); } }