I have something similar in my project, a project that it has already completed (it works), I just want to know if this is normal with SOLID principles.
static public class Tools
{
static public GetProduct(this id){...}
static public GetProductCategory(this id){...}
static public GetUser(this id){...}
}
and use is like this
var UserThatCreatedCategoryForThisProduct =
prodId.GetProduct().CategoryId.GetProductCategory().Creator.GetUser();
I know that it is obvious that this violates SRP, but this class is static and contains static methods that are independent of each other, and this is partly the same if I would create a static class for each method
source
share