Beispiel #1
0
 protected async Task <bool> UpdateAsync <TEntity>(TEntity entity, IDbTransaction transaction = null, int?commandTimeout = null) where TEntity : class
 {
     using (IDbConnection connection = new Npgsql.NpgsqlConnection(this.connectionString))
     {
         try
         {
             connection.Open();
             return(await connection.UpdateAsync(entity, transaction, commandTimeout));
         }
         catch (Exception exc)
         {
             Console.WriteLine(exc.Message);
             throw exc;
         }
     }
 }