using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Interfaces; namespace SQLiteRepository.Converters { static class TimeLogConverter { public static TimeLog ConvertToTimeLogDto(TimeLogDb log) { return new TimeLog { CalendarWeek = log.CalendarWeek, Direction = LogDirectionConverter.ConvertToLogDirectionDto(log.Direction), EventTime = log.SwipeEventDateTime, Id = log.Id, IdentifierId = log.IdentifierId, UserId = log.UserId_FK, Source = LogSourceConverter.ConvertToLogSourceDto(log.Source), Year = log.Year }; } public static TimeLogDb ConvertFromTimeLogDto(TimeLog log) { return new TimeLogDb { CalendarWeek = log.CalendarWeek, Year = log.Year, UserId_FK = log.UserId, IdentifierId = log.IdentifierId, Direction = LogDirectionConverter.ConvertFromLogDirectionDto(log.Direction), Id = log.Id, Source = LogSourceConverter.ConvertFromLogSourceDto(log.Source), SwipeEventDateTime = log.EventTime }; } } }