/// <summary>
        /// Converts this instance of <see cref="area"/> to an instance of <see cref="areaDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="area"/> to convert.</param>
        public static areaDto ToDTO(this area entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new areaDto();

            dto.v_AreaId       = entity.v_AreaId;
            dto.v_LocationId   = entity.v_LocationId;
            dto.v_Name         = entity.v_Name;
            dto.i_IsDeleted    = entity.i_IsDeleted;
            dto.i_InsertUserId = entity.i_InsertUserId;
            dto.d_InsertDate   = entity.d_InsertDate;
            dto.i_UpdateUserId = entity.i_UpdateUserId;
            dto.d_UpdateDate   = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="areaDto"/> to an instance of <see cref="area"/>.
        /// </summary>
        /// <param name="dto"><see cref="areaDto"/> to convert.</param>
        public static area ToEntity(this areaDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new area();

            entity.v_AreaId       = dto.v_AreaId;
            entity.v_LocationId   = dto.v_LocationId;
            entity.v_Name         = dto.v_Name;
            entity.i_IsDeleted    = dto.i_IsDeleted;
            entity.i_InsertUserId = dto.i_InsertUserId;
            entity.d_InsertDate   = dto.d_InsertDate;
            entity.i_UpdateUserId = dto.i_UpdateUserId;
            entity.d_UpdateDate   = dto.d_UpdateDate;

            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="areaDto"/> converted from <see cref="area"/>.</param>
 static partial void OnDTO(this area entity, areaDto dto);
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="area"/> converted from <see cref="areaDto"/>.</param>
 static partial void OnEntity(this areaDto dto, area entity);
Exemple #5
0
 public gesDto(String v_GesId, String v_AreaId, String v_Name, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, areaDto area, List <occupationDto> occupation)
 {
     this.v_GesId        = v_GesId;
     this.v_AreaId       = v_AreaId;
     this.v_Name         = v_Name;
     this.i_IsDeleted    = i_IsDeleted;
     this.i_InsertUserId = i_InsertUserId;
     this.d_InsertDate   = d_InsertDate;
     this.i_UpdateUserId = i_UpdateUserId;
     this.d_UpdateDate   = d_UpdateDate;
     this.area           = area;
     this.occupation     = occupation;
 }