Hello, I'm trying to figure out what the better/cleaner/more maintainable way is, for the following problem. My "Customer" class is generated via LINQ from the database. The customer has a special activation link which is a URL that needs to be generated from data from both a Customer instance and some static configuration data.
Solution 1: Extend the partial Customer Class with GenerateActivationUrl() method which will fetch data from its own instance and call the static class which has configuration data and then render the Url and return it as a string.
Solution 2: Make a "LinkBuilder" static helper class which takes a Customer as an argument for a GenerateActivationUrl(Customer customer) method which will then take the needed data from the customer instance and also the static configuration data and then return the Url as a string.
Which solution is better, and why? Thank you!