bradlnz / Elabor8.Bradl

2 stars 0 forks source link

Refactor opportunity, break out the logic into a unit #1

Open dw-e8 opened 1 year ago

dw-e8 commented 1 year ago

https://github.com/bradlnz/Elabor8.Bradl/blob/0784a8998b5da6287ddab24e2ab987b2dbe361c6/Elabor8.Bradl.CommandHandler/FactCsvCommandHandler.cs#L24

What do you think? Would the implementation benefit here, from a "business logic" unit that did the acquisition and sorting rather than being embedded in the handler?

bradlnz commented 1 year ago

Thanks @dw-e8 I have split this out and created a seperate project for command utilities so we can generate a csv for multiple types making it generic so that we can define any field type in the future. In regards to the data I have include a FactCsvField and I am fetching out the data from the repository using this data type. Makes it a lot cleaner and re-usable.