public override bool Equals(object target) { if (target != null && target.GetType() == typeof(Specification)) { return (Id == ((Specification)target).Id); } return false; }