You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
766 B
30 lines
766 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Model
|
|
{
|
|
public class Contact : IEquatable<Contact>
|
|
{
|
|
public string Id { get; set; }
|
|
public string FirstName { get; set; }
|
|
public string LastName { get; set; }
|
|
|
|
public bool Equals(Contact? other)
|
|
=> Id == other.Id;
|
|
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (ReferenceEquals(obj, null)) return false;
|
|
if (ReferenceEquals(this, obj)) return true;
|
|
if (GetType() != obj.GetType()) return false;
|
|
return Equals(obj as Contact);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
=> Id.GetHashCode();
|
|
}
|
|
}
|