22 lines
643 B
C#
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();
|
|
}
|
|
} |