laatzen/LaaProductionWeb/LaaProductionWeb.Services/Models/OrdersFoundModel.cs
2023-04-04 11:12:07 +02:00

22 lines
643 B
C#

namespace LaaProductionWeb.Services.Models
{
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class OrdersFoundModel : IEnumerable<OrderInfoModel>
{
private readonly IEnumerable<OrderInfoModel> orders;
public OrdersFoundModel(IEnumerable<OrderInfoModel> orders)
=> this.orders = orders;
public IEnumerator<OrderInfoModel> GetEnumerator()
=> this.orders
.Distinct(OrderInfoModel.Comparer)
.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator()
=> this.GetEnumerator();
}
}