* Further improvements

This commit is contained in:
2025-06-17 22:05:15 +02:00
parent a8e3a8be66
commit 30d2984add
6 changed files with 133 additions and 58 deletions

View File

@@ -0,0 +1,29 @@
namespace OrdersManagement.Models;
public class TransactionModel : IEquatable<TransactionModel>
{
public string? PartNumber { get; set; }
public string? ItemNumber { get; set; }
public decimal? Quantity { get; set; }
public bool Equals(TransactionModel? other)
{
if (other is null) return false;
if (ReferenceEquals(this, other)) return true;
return PartNumber == other.PartNumber;
}
public override bool Equals(object? obj)
{
if (obj is null) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((TransactionModel)obj);
}
public override int GetHashCode()
{
return PartNumber.GetHashCode();
}
}