24 lines
625 B
C#
24 lines
625 B
C#
using ServiceStationDataModels.Models;
|
|
using System.ComponentModel;
|
|
|
|
namespace ServiceStationContracts.ViewModels
|
|
{
|
|
public class ClientViewModel : IClientModel, IEquatable<ClientViewModel>
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
[DisplayName("ФИО")]
|
|
public string FIO { get; set; } = string.Empty;
|
|
|
|
public bool Equals(ClientViewModel? other) {
|
|
if (other is null) {
|
|
return false;
|
|
}
|
|
return this.Id == other.Id && this.FIO == other.FIO;
|
|
}
|
|
|
|
public override bool Equals(object obj) => Equals(obj as ClientViewModel);
|
|
public override int GetHashCode() => (Id, FIO).GetHashCode();
|
|
}
|
|
}
|