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; }
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); }
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, }); }