diff --git a/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/StudentWork.cs b/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/StudentWork.cs index 07ae143..cb10412 100644 --- a/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/StudentWork.cs +++ b/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/StudentWork.cs @@ -74,7 +74,7 @@ namespace ElectronicDiaryPostgresImplementation.WorkImplementation { using var con = SqlConnection.GetConnection(); con.Open(); - using var cmd = new NpgsqlCommand($"UPDATE student SET last_name = '{student.LastName}', first_name = '{student.FirstName}', patronymic = '{student.Patronymic}', fk_grade_id = {student.GradeId}, fk_user_id = {student.UserId} WHERE student_id = {student.Id}", con); + using var cmd = new NpgsqlCommand($"UPDATE student SET last_name = '{student.LastName}', first_name = '{student.FirstName}', patronymic = '{student.Patronymic}', fk_grade_id = {student.GradeId} WHERE student_id = {student.Id}", con); cmd.ExecuteNonQuery(); var element = Get(student.Id); return element; diff --git a/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/TeacherWork.cs b/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/TeacherWork.cs index d173817..a770eb5 100644 --- a/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/TeacherWork.cs +++ b/ElectronicDiary/ElectronicDiaryPostgresImplementation/WorkImplementation/TeacherWork.cs @@ -71,7 +71,7 @@ namespace ElectronicDiaryPostgresImplementation.WorkImplementation { using var con = SqlConnection.GetConnection(); con.Open(); - using var cmd = new NpgsqlCommand($"UPDATE teacher SET last_name = '{teacher.LastName}', first_name = '{teacher.FirstName}', patronymic = '{teacher.Patronymic}', fk_user_id = {teacher.UserId} WHERE teacher_id = {teacher.Id}", con); + using var cmd = new NpgsqlCommand($"UPDATE teacher SET last_name = '{teacher.LastName}', first_name = '{teacher.FirstName}', patronymic = '{teacher.Patronymic}' WHERE teacher_id = {teacher.Id}", con); cmd.ExecuteNonQuery(); var element = Get(teacher.Id); return element;