Изменение запроса Услуг
This commit is contained in:
parent
6989711277
commit
f6996a0d47
@ -64,8 +64,8 @@ public class ServiceRepository : IServiceRepository
|
|||||||
{
|
{
|
||||||
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
|
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
|
||||||
var queryInsert = @"
|
var queryInsert = @"
|
||||||
INSERT INTO Services (ServiceType, Description)
|
INSERT INTO Services (ServiceType, ServiceName, Description)
|
||||||
VALUES (@ServiceType, @Description)";
|
VALUES (@ServiceType, @ServiceName, @Description)";
|
||||||
connection.Execute(queryInsert, service);
|
connection.Execute(queryInsert, service);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -85,6 +85,7 @@ public class ServiceRepository : IServiceRepository
|
|||||||
UPDATE Services
|
UPDATE Services
|
||||||
SET
|
SET
|
||||||
ServiceType=@ServiceType,
|
ServiceType=@ServiceType,
|
||||||
|
ServiceName=@ServiceName,
|
||||||
Description=@Description
|
Description=@Description
|
||||||
WHERE Id=@Id";
|
WHERE Id=@Id";
|
||||||
connection.Execute(queryUpdate, service);
|
connection.Execute(queryUpdate, service);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user