Пример #1
0
        /// <summary>
        /// Converts this instance of <see cref="ClienteDTOS"/> to an instance of <see cref="Cliente"/>.
        /// </summary>
        /// <param name="dto"><see cref="ClienteDTOS"/> to convert.</param>
        public static Cliente ToEntity(this ClienteDTOS dto)
        {
            if (dto == null) return null;

            var entity = new Cliente();

            entity.ClienteId = dto.ClienteId;
            entity.Identificacion = dto.Identificacion;
            entity.NombreCliente = dto.NombreCliente;
            entity.Direccion = dto.Direccion;
            entity.Huella = dto.Huella;
            entity.FechaSistema = dto.FechaSistema;
            entity.Eliminado = dto.Eliminado;

            dto.OnEntity(entity);

            return entity;
        }
Пример #2
0
        /// <summary>
        /// Invoked when <see cref="ToEntity"/> operation is about to return.
        /// </summary>
        /// <param name="entity"><see cref="Cliente"/> converted from <see cref="ClienteDTOS"/>.</param>
partial         static void OnEntity(this ClienteDTOS dto, Cliente entity);