using AsbCloudApp.Data;
using AsbCloudApp.Data.ProcessMaps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudApp.Extensions
{
///
/// Расширения для поиска в истории
///
public static class ChangeLogExtensions
{
///
/// Действительные на момент времени значения
///
///
///
///
///
public static IEnumerable> WhereActualAtMoment(this IEnumerable> items, DateTimeOffset moment)
where T : ProcessMapPlanBaseDto
{
var actualItems = items
.Where(item => item.Creation <= moment)
.Where(item => item.Obsolete is null || item.Obsolete >= moment);
return actualItems;
}
}
}