Exemplo n.º 1
0
 protected T QueryFirst <T>(string sql, object parameters = null)
 {
     using (IDbConnection connection = new Npgsql.NpgsqlConnection(this.connectionString))
     {
         try
         {
             connection.Open();
             return(connection.QueryFirst <T>(sql, parameters));
         }
         catch (Exception exc)
         {
             Console.WriteLine(exc);
             throw exc;
         }
     }
 }