Ejemplo n.º 1
0
        public static JobAdNoteEntity Map(this JobAdNote note)
        {
            var entity = new JobAdNoteEntity
            {
                id          = note.Id,
                createdTime = note.CreatedTime,
                jobAdId     = note.JobAdId,
            };

            note.MapTo(entity);

            return(entity);
        }
Ejemplo n.º 2
0
        public static T MapTo <T>(this JobAdNoteEntity entity) where T : JobAdNote, new()
        {
            if (entity == null)
            {
                return(null);
            }

            return(new T
            {
                Id = entity.id,
                CreatedTime = entity.createdTime,
                JobAdId = entity.jobAdId,
                UpdatedTime = entity.lastUpdatedTime,
                Text = entity.text,
                OwnerId = entity.ownerId,
            });
        }
Ejemplo n.º 3
0
 public static void MapTo(this JobAdNote note, JobAdNoteEntity entity)
 {
     entity.lastUpdatedTime = note.UpdatedTime;
     entity.text            = note.Text;
     entity.ownerId         = note.OwnerId;
 }