diff --git a/SUBD_Car_rent/database/Implementation.cs b/SUBD_Car_rent/database/Implementation.cs index e9ebca0..94bbe47 100644 --- a/SUBD_Car_rent/database/Implementation.cs +++ b/SUBD_Car_rent/database/Implementation.cs @@ -30,7 +30,7 @@ namespace database var cars = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM car", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM car order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -103,7 +103,7 @@ namespace database var clients = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM client", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM client order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -176,7 +176,7 @@ namespace database var rentals = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM rental", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM rental order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -255,7 +255,7 @@ namespace database var carModels = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM car_model", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM car_model order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -326,7 +326,7 @@ namespace database var branches = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM branch", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM branch order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -392,7 +392,7 @@ namespace database var statuses = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM status", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM status order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) { @@ -452,7 +452,7 @@ namespace database var bodyTypes = new List(); using var conn = GetConnection(); conn.Open(); - using var cmd = new NpgsqlCommand("SELECT * FROM body_type", conn); + using var cmd = new NpgsqlCommand("SELECT * FROM body_type order by Id", conn); using var reader = cmd.ExecuteReader(); while (reader.Read()) {