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); }
public static void UpdateFromData(this tm.Timecard core, Timecard data) { core.ID = data.ID; core.Date = data.Date; }
public static void UpdateFromCore(this Timecard data, tm.Timecard core) { data.ID = core.ID; data.Date = core.Date; }