public static ScheduleDE Translate(this ScheduleMD from, ScheduleDE dest = null) { var to = dest ?? new ScheduleDE(); if (to.Id <= 0) { to.Id = from.Id; to.IsActive = true; } else { to.IsActive = from.IsActive; } to.Date = from.Date; to.StartTime = from.StartTime; to.EndTime = from.EndTime; to.AddressLine = from.AddressLine; to.City = from.City; to.Province = from.Province; to.Country = from.Country; to.ZipCode = from.ZipCode; to.CreatedDate = from.CreatedDate; to.CreatedById = from.CreatedById; to.IsValid = from.IsValid; return(to); }
public static ScheduleMD Translate(this ScheduleDE from) { var to = new ScheduleMD(); to.Id = from.Id; to.Date = from.Date; to.StartTime = from.StartTime; to.EndTime = from.EndTime; to.AddressLine = from.AddressLine; to.City = from.City; to.Province = from.Province; to.Country = from.Country; to.ZipCode = from.ZipCode; to.CreatedDate = from.CreatedDate; to.CreatedById = from.CreatedById; to.IsValid = from.IsValid; return(to); }