I have a grid and when the user closes the form, I want to save some settings for the user who is logged in. I already have the 2 implementation methods, but I am wondering where to implement this functionality:
- Shall I create a static Utility class with the two methods
- Shall I create a new class, and name this one something like UserSettingsManager?
For now I have two methods, but I can imagine that I need more methods in future. What should I do?
Edit:
I see already a few answers (thnx for that), but can you also say why you would go for that option?
I would go for the
UserSettingsManager, sounds reasonable.Avoid static classes unless absolutely needed because such classes are less easy to test/mock/inject than normal classes.