示例#1
0
 public static void MapTo(this DiaryEntry entry, CandidateDiaryEntryEntity entity)
 {
     entity.title       = entry.Title;
     entity.description = entry.Description;
     entity.startTime   = entry.StartTime;
     entity.endTime     = entry.EndTime;
     entity.totalHours  = entry.TotalHours;
 }
示例#2
0
        public static CandidateDiaryEntryEntity Map(this DiaryEntry entry, Guid diaryId)
        {
            var entity = new CandidateDiaryEntryEntity
            {
                id      = entry.Id,
                diaryId = diaryId,
                deleted = false,
            };

            entry.MapTo(entity);
            return(entity);
        }
示例#3
0
 public static DiaryEntry Map(this CandidateDiaryEntryEntity entity)
 {
     return(new DiaryEntry
     {
         Id = entity.id,
         IsDeleted = entity.deleted,
         Title = entity.title,
         Description = entity.description,
         StartTime = entity.startTime,
         EndTime = entity.endTime,
         TotalHours = entity.totalHours,
     });
 }