public void Execute(UpdateCsvFileSourceCommand command) { var source = _repository.GetSource <CsvFileSource>(); source.FilePath = command.FilePath; var table = _dataAdapter.GetTable(source); var maps = table.Columns.Cast <DataColumn>() .Select(column => CreateMap(table, column)) .ToList(); source.SetMaps(maps); _eventBus.Raise(new CsvFileSourceChangedEvent()); }