Пример #1
0
 /// <summary>
 /// 转换为系统配置数据传输对象
 /// </summary>
 /// <param name="entity">系统配置实体</param>
 public static SystemConfigDto ToDto(this SystemConfig entity)
 {
     return(new SystemConfigDto {
         Id = entity.Id.ToString(),
         CategoryId = entity.CategoryId,
         CategoryName = entity.GetCategory().Name,
         Code = entity.Code,
         Value = entity.Value,
         Description = entity.Description,
         CreateTime = entity.CreateTime,
         Version = entity.Version,
     });
 }