при запросе сортируем по Ид
This commit is contained in:
parent
37bc219c04
commit
e0739f9db9
@ -30,7 +30,7 @@ namespace database
|
||||
var cars = new List<Car>();
|
||||
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<Client>();
|
||||
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<Rental>();
|
||||
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<CarModel>();
|
||||
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<Branch>();
|
||||
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<Status>();
|
||||
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<BodyType>();
|
||||
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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user