/// <summary> /// 通过Id获取培训需求提报信息进行编辑或修改 /// </summary> public async Task <GetT_RequireForEditOutput> GetT_RequireForEditAsync(NullableIdDto <int> input) { var output = new GetT_RequireForEditOutput(); T_RequireEditDto t_RequireEditDto; if (input.Id.HasValue) { var entity = await _t_RequireRepository.GetAsync(input.Id.Value); t_RequireEditDto = entity.MapTo <T_RequireEditDto>(); } else { t_RequireEditDto = new T_RequireEditDto(); } output.T_Require = t_RequireEditDto; return(output); }
/// <summary> /// 构造函数 /// </summary> /// <param name="output"></param> public CreateOrEditT_RequireModalViewModel(GetT_RequireForEditOutput output) { output.MapTo(this); }