I’m curious what “layer” of a system common extensions that are global to the application belong in. For instance, I may have extensions that let me use the Rails-like “DaysAgo”, “MonthsAgo”, etc. type of extension method on integers. What layer of a project does this typically belong in? I was thinking Infrastructure, but that seems to mean database-related (e.g. base repositories and data access). I have a “Core” library project, so maybe it belongs there?
I understand that you want to group extensions that are related to a specific group of classes, but these are essentially used across the entire application. In the days before extension methods, they would be in a Utilities static class or the like, so where should they live now?
You can (better) create multiple infrastructure projects based on scope for example:
Infrastructure.Common (here comes the general infrastructure – best fit for extension methods)
Infrastructure.Data (Data access)
Infrastrcuture. bla bla bla