Beispiel #1
0
        public static DB.UserStatistics ToEntity(DT.UserStatistics source)
        {
            if (source == null)
            {
                return(null);
            }
            var entity = new DB.UserStatistics(); ToEntity(source, entity);

            return(entity);
        }
Beispiel #2
0
 public static void ToEntity(DT.UserStatistics source, DB.UserStatistics target)
 {
     if ((source != null) && (target != null))
     {
         target.StatisticsId                = source.Id;
         target.UserId                      = source.UserId;
         target.UsedCores                   = source.UsedCores;
         target.ExecutionTimeMs             = source.ExecutionTime.TotalMilliseconds;
         target.ExecutionTimeMsFinishedJobs = source.ExecutionTimeFinishedJobs.TotalMilliseconds;
         target.StartToEndTimeMs            = source.StartToEndTime.TotalMilliseconds;
     }
 }