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