20 lines
739 B
C#
20 lines
739 B
C#
![]() |
using Mirea.Api.Endpoint.Common.Services;
|
|||
|
using Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
|
|||
|
namespace Mirea.Api.Endpoint.Common.MapperDto;
|
|||
|
|
|||
|
public static class CronUpdateSkipConverter
|
|||
|
{
|
|||
|
public static List<Dto.Common.CronUpdateSkip> ConvertToDto(this IEnumerable<ScheduleSettings.CronUpdateSkip> pairPeriod) =>
|
|||
|
pairPeriod.Select(x => new Dto.Common.CronUpdateSkip()
|
|||
|
{
|
|||
|
Start = x.Start,
|
|||
|
End = x.End,
|
|||
|
Date = x.Date
|
|||
|
}).ToList();
|
|||
|
public static List<ScheduleSettings.CronUpdateSkip> ConvertFromDto(this IEnumerable<Dto.Common.CronUpdateSkip> pairPeriod) =>
|
|||
|
pairPeriod.Select(x => x.Get()).ToList();
|
|||
|
}
|