блямба кавычки, теперь точно починил апдейт
This commit is contained in:
parent
ed872cb31c
commit
37bc219c04
@ -218,7 +218,7 @@ namespace database
|
||||
{
|
||||
using var conn = GetConnection();
|
||||
conn.Open();
|
||||
using var cmd = new NpgsqlCommand("UPDATE rental SET car_id = @CarId, client_id = @ClientId, start_date = '@StartDate', end_date = '@EndDate', cost = @Cost WHERE id = @Id", conn);
|
||||
using var cmd = new NpgsqlCommand("UPDATE rental SET car_id = @CarId, client_id = @ClientId, start_date = @StartDate, end_date = @EndDate, cost = @Cost WHERE id = @Id", conn);
|
||||
cmd.Parameters.AddWithValue("@Id", rental.Id);
|
||||
cmd.Parameters.AddWithValue("@CarId", rental.CarId);
|
||||
cmd.Parameters.AddWithValue("@ClientId", rental.ClientId);
|
||||
|
Loading…
Reference in New Issue
Block a user