using Mirea.Api.Endpoint.Configuration.General.Settings; using System.Collections.Generic; using System.Linq; namespace Mirea.Api.Endpoint.Common.Services; public static class PairPeriodTimeConverter { public static Dictionary ConvertToDto(this IDictionary pairPeriod) => pairPeriod.ToDictionary(kvp => kvp.Key, kvp => new Dto.Common.PairPeriodTime { Start = kvp.Value.Start, End = kvp.Value.End }); public static Dictionary ConvertFromDto(this IDictionary pairPeriod) => pairPeriod.ToDictionary(kvp => kvp.Key, kvp => new ScheduleSettings.PairPeriodTime(kvp.Value.Start, kvp.Value.End)); }