/// <summary> /// 转成应用程序实体 /// </summary> public static Application ToEntity(this ApplicationDto dto) { if (dto == null) { return(null); } var result = dto.MapTo <Application>(); dto.MapTo(result.Client); result.IsClient = dto.ApplicationType == ApplicationType.Client; result.Client.RedirectUris.Add(dto.RedirectUri); result.Client.PostLogoutRedirectUris.Add(dto.PostLogoutRedirectUri); return(result); }
/// <summary> /// 转换为应用程序实体 /// </summary> /// <param name="dto">应用程序数据传输对象</param> public static Application ToEntity(this ApplicationDto dto) { if (dto == null) { return(new Application()); } return(dto.MapTo(new Application(dto.Id.ToGuid()))); }
/// <summary> /// 转换为应用程序实体 /// </summary> /// <param name="dto">应用程序数据传输对象</param> public static Admin.Systems.Domain.Models.Application ToEntity(this ApplicationDto dto) { var result = dto?.MapTo <Admin.Systems.Domain.Models.Application>(); return(result); }