Пример #1
0
        public static tm.Timecard ToCore(this Timecard data)
        {
            var core = new tm.Timecard(data.ID, data.Date);

            if (data.Activities != null)
            {
                core.Activities.AddRange(data.Activities.Select(a => a.ToCore()));
            }

            return(core);
        }
Пример #2
0
 public static void UpdateFromData(this tm.Timecard core, Timecard data)
 {
     core.ID   = data.ID;
     core.Date = data.Date;
 }
Пример #3
0
 public static void UpdateFromCore(this Timecard data, tm.Timecard core)
 {
     data.ID   = core.ID;
     data.Date = core.Date;
 }