Exemplo n.º 1
0
 public static void Actualizar(SeaceWCF.Dtos.personDTO dto, person entity)
 {
     entity.idPerson = dto.idPerson;
     entity.first_name = dto.first_name;
     entity.last_name = dto.last_name;
     entity.picture = dto.picture;
     entity.email = dto.email;
     entity.active = dto.active;
     entity.username = dto.username;
     entity.password = dto.password;
     entity.last_update = dto.last_update;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="personDTO"/> to an instance of <see cref="person"/>.
        /// </summary>
        /// <param name="dto"><see cref="personDTO"/> to convert.</param>
        public static person ToEntity(this personDTO dto)
        {
            if (dto == null) return null;

            var entity = new person();

            entity.idPerson = dto.idPerson;
            entity.first_name = dto.first_name;
            entity.last_name = dto.last_name;
            entity.picture = dto.picture;
            entity.email = dto.email;
            entity.active = dto.active;
            entity.username = dto.username;
            entity.password = dto.password;
            entity.last_update = dto.last_update;

            dto.OnEntity(entity);

            return entity;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Invoked when <see cref="ToEntity"/> operation is about to return.
        /// </summary>
        /// <param name="entity"><see cref="person"/> converted from <see cref="personDTO"/>.</param>
partial         static void OnEntity(this personDTO dto, person entity);