public async Task <ApiRequestResult> AddAsync(IntegrationChangeHistoryDto dto) { var command = dto.EntityMap <IntegrationChangeHistoryDto, IntegrationChangeHistory>(); await _integrationChangeHistoryRepository.AddAsync(command); return(ApiRequestResult.Success("添加成功")); }
public async Task <ApiRequestResult> UpdateAsync(IntegrationChangeHistoryDto dto) { var entity = await _integrationChangeHistoryRepository.GetAsync(dto.Id.Value); var newEntity = dto.EntityMap(entity); await _integrationChangeHistoryRepository.UpdateAsync(newEntity); return(ApiRequestResult.Success("修改成功")); }