<prompt> Andika mpango wa C unaoiga mfumo wa msingi wa akaunti ya benki na utendaji wa kuweka, kutoa na kukagua salio. Hifadhi data ya akaunti kwenye hifadhidata ya PostgreSQL na utekeleze kushughulikia shughuli ili kuhakikisha uthabiti wa data.PLINFORMAT  <response>: kutumia Mfumo;kutumia Npgsql;Akaunti ya benki ya daraja la umma Id ya int ya umma pata; kuweka; umma kamba Jina kupata; kuweka; Salio la decimal la umma pata; kuweka; Mjenzi Akaunti ya Benki ya umma kitambulisho cha int, jina la kamba, salio la desimali kitambulisho kitambulisho; Jina jina; Mizani usawa; Uunganisho wa Hifadhidata ya darasa la umma mfuatano wa kusoma pekee _connectionString; Uunganisho wa Hifadhidata ya Ummastring connectionString _connectionString connectionString; Amana ya utupu ya umma Id ya akaunti, kiasi cha desimali kutumia var conn new NpgsqlConnection_connectionString; conn.Fungua; kutumia var transaction conn.BeginTransaction; jaribu string sql SASISHA akaunti SET salio salio kiasi WHERE id id; kutumia var cmd NpgsqlCommand mpya sql, conn; cmd.Parameters.AddWithValueid, accountId; cmd.Parameters.AddWithValuekiasi, kiasi; int rowsAffected cmd.ExecuteNonQuery; ikiwa safu Imeathiriwa 0 kutupa Ubaguzi mpyaAkaunti haipatikani.; shughuli.Kamati; kukamata shughuli.Rudisha nyuma; kutupa; Uondoaji wa utupu wa umma Id ya akaunti, kiasi cha desimali kutumia var conn new NpgsqlConnection_connectionString; conn.Fungua; kutumia var transaction conn.BeginTransaction; jaribu string sql SASISHA akaunti WEKA salio salio - amount WAPI id id NA salio kiasi; kutumia var cmd NpgsqlCommand mpya sql, conn; cmd.Parameters.AddWithValueid, accountId; cmd.Parameters.AddWithValuekiasi, kiasi; int rowsAffected cmd.ExecuteNonQuery; ikiwa safu Imeathiriwa 0 kutupa Ubaguzi mpyaFedha haitoshi au akaunti haijapatikana.; shughuli.Kamati; kukamata shughuli.Rudisha nyuma; kutupa; Akaunti ya benki ya umma GetAccountByIdint accountId kutumia var conn new NpgsqlConnection_connectionString; conn.Fungua; string sql CHAGUA kitambulisho, jina, salio KUTOKA kwa akaunti WAPI id id; kutumia var cmd NpgsqlCommand mpya sql, conn; cmd.Parameters.AddWithValueid, accountId; kutumia var reader cmd.ExecuteReader; ikiwa !msomaji.Soma kutupa Ubaguzi mpyaAkaunti haipatikani.; rudisha Akaunti mpya ya Benkimsomaji.GetInt320, msomaji.GetString1, msomaji.GetDecimal2; Programu ya darasa tuli utupu Mainstring args string connectionString Hostlocalhost;Jina la mtumiajipostgres;Nenosirinenosiri_lako; Hifadhidatabenki; var db new DatabaseConnectionconnectionString; int accountId 1; amana ya desimaliKiasi 1000m; uondoaji wa desimaliKiasi 500m; Console.WriteLineSalio la awali:; Akaunti ya Benki db.GetAccountByIdaccountId; Console.WriteLineID: account.Id, Jina: account.Name, Salio: account.Balance; Console.WriteLinenInaweka...; db.DepositaccountId, depositAmount; akaunti db.GetAccountByIdaccountId; Console.WriteLineID: account.Id, Jina: account.Name, Salio: account.Balance; Console.WriteLinenInaondoa...; db.Toakitambulisho cha akaunti, kiasi cha pesa; akaunti db.GetAccountByIdaccountId; Console.WriteLineID: account.Id, Jina: account.Name, Salio: account.Balance; 