Ajout de la méthode equals dans userdto
continuous-integration/drone/push Build is passing Details

pull/44/head^2
Clement CHIEU 1 year ago
parent 0a2aa5ea92
commit 40e422d778

@ -36,21 +36,27 @@
public bool Equals(UserDto? other)
{
if (object.ReferenceEquals(other, null))
return (this.Id == other?.Id);
}
public override bool Equals(object? obj)
{
if (object.ReferenceEquals(obj, null))
{
return false;
}
if (object.ReferenceEquals(this, other))
if (object.ReferenceEquals(this, obj))
{
return true;
}
if (this.GetType() != other.GetType())
if (this.GetType() != obj.GetType())
{
return false;
}
return (this.Id == other.Id);
return this.Equals(obj as UserDto);
}
public override int GetHashCode()

Loading…
Cancel
Save