Skip to content

Commit

Permalink
Add UUID parameter to SetLecturer DAL call
Browse files Browse the repository at this point in the history
  • Loading branch information
scogliera committed Dec 19, 2023
1 parent 95def99 commit 35c06bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DAL/IMongoDal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public interface IMongoDal
{
public Lecturer? GetLecturer(Guid id);
public IEnumerable<Lecturer> GetAllLecturers();
public void SetLecturer(Lecturer lecturer);
public void SetLecturer(Lecturer lecturer, Guid uuid);
public bool DeleteLecturer(Guid id);
public void AddLecturer(Lecturer lecturer);
}
4 changes: 2 additions & 2 deletions DAL/MongoDal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public IEnumerable<Lecturer> GetAllLecturers()
return _lecturersCollection.Find(_ => true).ToEnumerable();
}

public void SetLecturer(Lecturer lecturer)
public void SetLecturer(Lecturer lecturer, Guid uuid)
{
var filter = Builders<Lecturer>.Filter.Eq(l => l.Uuid, lecturer.Uuid);
var filter = Builders<Lecturer>.Filter.Eq(l => l.Uuid, uuid);
var update = Builders<Lecturer>.Update
.Set(l => l.TitleBefore, lecturer.TitleBefore)
.Set(l => l.FirstName, lecturer.FirstName)
Expand Down

0 comments on commit 35c06bd

Please sign in to comment.