public ScheduleInfoDTO MapToScheduleInfoDTO(ScheduleEntity source, ScheduleInfoDTO target = null) { if (source == null) { return(null); } if (target == null) { target = new ScheduleInfoDTO(); } MapToVersionInfoDTO(source, target); target.ScheduleId = source.ScheduleId; target.Name = source.Name; return(target); }
public ScheduleEntity GetScheduleEntity(ScheduleInfoDTO source) { //if (source == null) // return null; //ScheduleEntity target; //if (source.ScheduleId == null) // target = new ScheduleEntity(); //else // target = DbContext.Set<ScheduleEntity>().Find(source.ScheduleId); //if (target == null) // throw new EntityNotFoundException(nameof(ScheduleEntity), "Could not find Entity in Database.", source.ScheduleId); //return target; return(DefaultGet <ScheduleInfoDTO, ScheduleEntity>(source)); }