示例#1
0
        ///// <summary>
        ///// 转换为网络勾子推送内容日志实体
        ///// </summary>
        ///// <param name="dto">网络勾子推送内容日志数据传输对象</param>
        //public static WHLogs ToEntity3( this WHLogsDto dto ) {
        //    if( dto == null )
        //        return new WHLogs();
        //    return WHLogsFactory.Create(
        //
        //
        //        id : dto.Id.ToGuid(),
        //
        //
        //        whId : dto.WhId,
        //
        //
        //        wHTypes : dto.WHTypes,
        //
        //
        //        requestTop : dto.RequestTop,
        //
        //
        //        content : dto.Content,
        //
        //
        //        responseTop : dto.ResponseTop,
        //
        //
        //        responseContent : dto.ResponseContent,
        //
        //
        //        responseBody : dto.ResponseBody,
        //
        //
        //        creationTime : dto.CreationTime,
        //
        //
        //        isDeleted : dto.IsDeleted,
        //
        //
        //        version : dto.Version
        //
        //    );
        //}

        /// <summary>
        /// 转换为网络勾子推送内容日志数据传输对象
        /// </summary>
        /// <param name="entity">网络勾子推送内容日志实体</param>
        public static WHLogsDto ToDto(this WHLogs entity)
        {
            if (entity == null)
            {
                return(new WHLogsDto());
            }
            return(entity.MapTo <WHLogsDto>());
        }
示例#2
0
 /// <summary>
 /// 转换为网络勾子推送内容日志持久化对象
 /// </summary>
 /// <param name="entity">网络勾子推送内容日志实体</param>
 public static WHLogsPo ToPo(this WHLogs entity)
 {
     if (entity == null)
     {
         return(null);
     }
     return(entity.MapTo <WHLogsPo>());
 }