public static Logic.Objects.Base_Objects.Logging.YuleLog MapLog(Entities.YuleLog contextLog)
 {
     Logic.Objects.Base_Objects.Logging.YuleLog logicLog = new Logic.Objects.Base_Objects.Logging.YuleLog()
     {
         logID    = contextLog.LogId,
         category = MapCategory(contextLog.Category),
         logDate  = contextLog.LogDate,
         logText  = contextLog.LogText
     };
     return(logicLog);
 }
 public static Entities.YuleLog MapLog(Logic.Objects.Base_Objects.Logging.YuleLog logicLog)
 {
     Entities.YuleLog contextLog = new Entities.YuleLog()
     {
         LogId      = logicLog.logID,
         CategoryId = logicLog.category.categoryID,
         LogDate    = logicLog.logDate,
         LogText    = logicLog.logText
     };
     return(contextLog);
 }
Esempio n. 3
0
        private Logic.Objects.Base_Objects.Logging.YuleLog makeLogTemplateObject(Category logicCategory, string logMessage)
        {
            TimeZoneInfo easternZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");

            Logic.Objects.Base_Objects.Logging.YuleLog logicLog = new Logic.Objects.Base_Objects.Logging.YuleLog()
            {
                logID    = Guid.NewGuid(),
                category = logicCategory,
                logDate  = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, easternZone),
                logText  = logMessage
            };
            return(logicLog);
        }