namespace Entities { public class AnswerEntity { /// /// define an entity of an answer for a Question with Mutiple Choice /// properties : /// Id : identifier in the database /// Content : content of the answer /// public long Id { get; set; } public string Content { get; set; } = null!; /// /// equality protocole /// /// an object /// /// true if the object is an AnswerEntity /// and the two contents are equals /// (we don't care about the id because /// he's set by the database /// public override bool Equals(object? obj) { return obj != null && obj is AnswerEntity other && other.Content == Content; } /// /// GetHashCode method /// /// base.GetHashCode public override int GetHashCode() { return base.GetHashCode(); } } }