datenbank referenzen geupdated
This commit is contained in:
@@ -12,7 +12,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||
{
|
||||
public class HaltungDataService : PostgresqlDataService, IHaltungDataService
|
||||
{
|
||||
public HaltungDataService(string connectionstring) : base(connectionstring, "Kanaele")
|
||||
public HaltungDataService(string connectionstring) : base(connectionstring, "haltung")
|
||||
{
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||
ISchachtDataService schachtDataService = new SchachtDataService(connString);
|
||||
IEnumerable<Schacht> schaechte = await schachtDataService.GetAllByProjekt(projektID);
|
||||
|
||||
string command = "SELECT * FROM " + tableName + " WHERE \"ProjektId\" = @1";
|
||||
string command = "SELECT * FROM " + tableName + " WHERE ref_projekt_id = @1";
|
||||
using (var cmd = new NpgsqlCommand(command, conn))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("1", projektID);
|
||||
@@ -82,14 +82,14 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||
{
|
||||
|
||||
string command = "UPDATE " + tableName + " SET " +
|
||||
" \"Objektbezeichnung\"=@1, " +
|
||||
" \"StartSchachtId\"=@2, " +
|
||||
" \"EndSchachtId\"=@3, " +
|
||||
" \"DN\"=@4, " +
|
||||
" \"Material\"=@5, " +
|
||||
" \"Haltungslaenge\"=@6, " +
|
||||
" \"Entwaesserung\"=@7 " +
|
||||
" WHERE \"Id\" = @8";
|
||||
" objektbezeichnung=@1, " +
|
||||
" ref_startschacht_id=@2, " +
|
||||
" ref_endschacht_id=@3, " +
|
||||
" dn=@4, " +
|
||||
" material=@5, " +
|
||||
" haltungslaenge=@6, " +
|
||||
" entwaesserung=@7 " +
|
||||
" WHERE haltung_id = @8";
|
||||
using(var cmd = new NpgsqlCommand(command,conn))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||
|
||||
Reference in New Issue
Block a user