示例#1
0
        /// <summary>
        /// Converts this instance of <see cref="ROLESDTO"/> to an instance of <see cref="ROLES"/>.
        /// </summary>
        /// <param name="dto"><see cref="ROLESDTO"/> to convert.</param>
        public static ROLES ToEntity(this ROLESDTO dto)
        {
            if (dto == null) return null;

            var entity = new ROLES();

            entity.IDROL = dto.IDROL;
            entity.CODROL = dto.CODROL;
            entity.NOMROL = dto.NOMROL;
            entity.ESTADO = dto.ESTADO;

            dto.OnEntity(entity);

            return entity;
        }
示例#2
0
        /// <summary>
        /// Invoked when <see cref="ToEntity"/> operation is about to return.
        /// </summary>
        /// <param name="entity"><see cref="ROLES"/> converted from <see cref="ROLESDTO"/>.</param>
partial         static void OnEntity(this ROLESDTO dto, ROLES entity);