/// <summary> /// 编辑 /// </summary> protected virtual async Task Update(FlowSchemeEditDto input) { var entity = await _flowSchemeRepository.GetAsync(input.Id); input.MapTo(entity); await _flowSchemeRepository.UpdateAsync(entity); }
/// <summary> /// 新增 /// </summary> protected virtual async Task <FlowSchemeEditDto> Create(FlowSchemeEditDto input) { var entity = input.MapTo <FlowScheme>(); entity = await _flowSchemeRepository.InsertAsync(entity); return(entity.MapTo <FlowSchemeEditDto>()); }